User Tools

Site Tools


linux:slack_4app

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
  • 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>
2023/08/29 13:04

rsync server

  • create rsyncd.conf in etc
    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
    rsync	stream	tcp	nowait	root	/usr/bin/rsync	rsync --daemon
  • in services (etc), insert
    rsync	873/tcp
  • create rsyncd.secrets in etc
    rsyncd.secrets
    pub:pub
  • start rsync daemon
    /usr/bin/rsync --daemon --config=etc/rsyncd.conf

Steam on Slack64 (in chroot32)

on an x86_64 machine,

  • install libtxc_dxtn package from slackbuilds.org (64-bit)
  • use 'slackroot' to create 32-bit chroot environment (chroot32)
    • target for desktop
  • ssh into localhost to enter chroot32 as normal user
    • remember to run 'preproot' (as root) prior to that
    • … and 'preproot –release' when done
  • install packages
    • install alien_bob's steamclient package
    • install libtxc_dxtn package from slackbuilds.org (32-bit)
  • run 'linux32' to create an official 32-bit environment
  • run 'steam -tcp'
linux/slack_4app.txt · Last modified: by azman