linux:slack_4app
This is an old revision of the document!
Table of Contents
Slackware Application
Running applications (@software) on Slackware… most are applicable to all distributions.
'Hidden' Application
There are a couple (a few?)of applications that I thought have great features but relatively unknown (I only knew about them after looking for specific solution). Here they are:
- xfig - nice app to create figures for use with latex
- xpaint - can do screen capture (
xpaint -snapshot
)
Apache (web server) Setup
Modify httpd config file:
- change document root to a folder my main user have full access
- also create a link to it from my user account
- allow php to be indexed ⇒ add to directory index in dir_module
- enable php (towards the end of the file) ⇒ include mod_php.conf
- enable mod_rewrite (API server?) ⇒ LoadModule … mod_rewrite.so
- optional: set serveradmin email and servername
- optional: to only serve locally, set listen localhost:80 ???
More modifications for https:
- enable loadmodule mod_ssl.so
- enable loadmodule mod_socache_shmcb.so
- generate private key:
openssl genrsa -out privkey.pem 2048
- rsa private key with 2048-bit long modulus written to file
- generate cert:
openssl req -new -x509 -key privkey.pem -out cacert.pem -days 1095
- include httpd-ssl.conf
- modify httpd-ssl.conf accordingly…
mariadb/mysql Setup
- run
mysql_install_db
- make sure permision given to user mysql
chown -R mysql:mysql /var/lib/mysql
- start daemon
rc.mysqld
- run
/usr/bin/mysql_secure_installation
- create specific database for specific app
create database app_db;
- create specific user for specific app and grant all access
grant all privileges on app_db.* to 'user_app'@'localhost' identified by 'pass_app';
- just formality, run
flush privileges;
- to additionally create specific user for specific app
create user 'user_app'@'localhost' identified by 'pass_app';
- recover root password:
- stop daemon
rc.mysqld
- run
# mysqld_safe --skip-grant-tables & # mysql -u root $ mysql -uroot -p mysql> use mysql; mysql> update user set password=PASSWORD('<newpass>') where User='root'; mysql> flush privileges; mysql> exit
Backup a DB:
mysqldump -p -u user userdb > userapp-$(date +%Y%m%d%H%M%S).sql
TeXLive Install/Setup
The default tetex is usable, but it is no longer maintained and some new packages are not available.
The recommended TeX distribution is TeXLive.
- Download from here
- get Unix Installer
- extract path:
/home/share/tool/texlive
- Execute
./install-tl -gui
- install path:
/home/share/tool/texlive/YYYY
(currently, YYYY=2020) - select basic, then customize (e.g. lang:en, graphics, math, etc.)
- setup environment variable
TL_VERS="2020" TL_PATH="/home/share/tool/texlive/${TL_VERS}" export PATH=${TL_PATH}/bin/x86_64-linux:$PATH export MANPATH=${TL_PATH}/texmf-dist/doc/man:$MANPATH export INFOPATH=${TL_PATH}/texmf-dist/doc/info:$INFOPATH
- setup tlmgr (tlmgr option repository ctan)
- Run manager
tlmgr --gui
- needs perl-tk
- to get collection of a package
tlmgr show <package>
rsync server
- create
/{etc}/rsyncd.conf
- rsync.conf
max connections = 2 log file = /var/log/rsync.log timeout = 300 [share] comment = Shared Stuff path = /home/share read only = yes list = yes hosts allow = 192.168.3.0/24 uid = nobody gid = nobody #auth users = pub #secrets file = /{etc}/rsyncd.secrets
- modify subnet mask address for host allow accordingly
- in
inetd.conf
(etc)- insert this line
rsync stream tcp nowait root /usr/bin/rsync rsync --daemon
- in
services
(etc)- insert this line
rsync 873/tcp
- create
rsyncd.secrets
in etc- rsyncd.secrets
pub:pub
- start rsync daemon
/usr/bin/rsync --daemon --config=/{etc}/rsyncd.conf
linux/slack_4app.1736659901.txt.gz · Last modified: by azman