null 2.0

Slackware Linux, Oracle, Programming

Category: slackware

VMware Workstation 12.5.7 on Slackware 14.2 current (kernel 4.9.35)

No patch is needed but one has to rebuild vmmon and vmnet modules:
vmmon module:
# cd /usr/lib/vmware/modules/source
# tar xvf vmmon.tar
# cd vmmon-only
# make
# gzip vmmon.ko
# cp vmmon.ko.gz /lib/modules/4.9.35/kernel/drivers/misc/
# cd ..
# rm vmmon.o
# rm -rf vmmon-only

vmnet module (same as vmmon):
# cd /usr/lib/vmware/modules/source
# tar xvf vmnet.tar
# cd vmnet-only
# make
# gzip vmnet.ko
# cp vmnet.ko.gz /lib/modules/4.9.35/kernel/drivers/misc/
# cd ..
# rm vmnet.o
# rm -rf vmnet-only

Now load new modules:
# depmod -a
and try to start vmware service:
# /etc/init.d/vmware restart

If, after that, vmware still doesn’t start, take a look at logs at
/tmp/vmware-<username>/vmware-apploader-<pid>.log
If there is error as the end looking like this:
Unable to load libfontconfig.so.1
there is solution for that too:
# cd /usr/lib/vmware/lib/libz.so.1
# mv libz.so.1 libz.so.1.old
# ln -s /usr/lib64/libz.so.1 .

After that everything should work fine.

Advertisements

uninstalling vmware on slackware

i tried uninstalling with vmware-installer but nothing happened, so this is how i managed to uninstall it manually

uninstall step by step:

# locate vmware | less
# rm /usr/include/vmware-vix -r
# rm /usr/sbin/vmware-authd
# rm /usr/bin/vmware-*
# rm /usr/doc/vmware-* -r
# rm /usr/lib/vmware* -r
# rm /var/log/vmware-installer -r
# rm /etc/vmware* -r

VPN server (pptpd) install on Slackware 13

– download pptpd from SlackBuilds and install
– configuration files:
— /etc/pptpd.conf – here change ip addresses for clients and server name if you want, mine:
localip 192.168.158.249
remoteip 192.168.158.250-253

— /etc/ppp/options.pptpd – encription configuration, I left it as it was
— /etc/ppp/chap-secrets – add client usernames and passwords here, like:
popeye pptpd oliva * username: popeye password: oliva server pptpd (as set in pptpd.conf)

problem:
– users cannot login, this message in /var/log/syslog:
Plugin /usr/lib/pptpd/pptpd-logwtmp.so is for pppd version 2.4.3, this is 2.4.4
solution:
– comment out option logwtmp in /etc/pptpd.conf:
#logwtmp

Slackware 13 Privoxy proxy server installation

1.) get privoxy from SlackBuilds.org and install it

2.) take a look at privoxy configuration file /etc/privoxy/config. Here you already have line for using with tor but it’s commented out so find it and uncomment it so it says forward-socks4a / 127.0.0.1:9050 . (carefully with the dot in the end, it’s mandatory)
– privoxy has great comments in config file so you can easily understand which option does what. I changed logging level to debug levels 1, 1024, 4096 and 8192 (four separate lines in config) and made it listen on my network interface listen-address 192.168.0.1:8118
– it may be a good idea to set forwarded-connect-retries 10 cause tor network is really slow and timeouts can happen oftenly.

3.) start privoxy: /etc/rc.d/rc.privoxy start

4.) if you want to make privoxy autostart with system make rc.privoxy file executable: chmod 755 /etc/rc.d/rc.privoxy and add this to your rc.local:
# Start Privoxy proxy server
if [ -x /etc/rc.d/rc.privoxy ]; then
/etc/rc.d/rc.privoxy start
fi

next:
configuring firefox profile to use tor network and maximize anonymity

TOR (The Onion Router) on Slackware 13

1.) get tor from SlackBuilds.org
– tor needs libevent library, you need to get it from SlackBuilds.org and install before installing tor itself.

Note:
Tor version 0.2.1.20 has problems with openssl-0.9.8l-i486-1 – I had to remove it and install older version from slackware 12.2 repository (openssl-0.9.8i-i486-1). Tor just stopped at Bootstrapped 10% and couldn’t get further from there (it should go to 100% if working normally).

2.) after installation take a look into tor configuration file at /etc/tor/torrc
– essentially, you can just leave everything as is. Tor will be running on localhost port 9050 and it will be available only from localhost.
– the only thing I changed here is uncommented line SocksListenAddress 192.168.0.1:9050 so I can use it as proxy from other computers in network. If you don’t need tor listening on outer network interface or you use it strictly as http proxy and intend to install proxy on the same machine as tor then you can just leave everything as it is.

3.) Start tor by typing /etc/rc.d/rc.tor start

4.) if you want to make tor autostart with system make rc.tor file executable: chmod 755 /etc/rc.d/rc.tor and add this to your rc.local:
# Start Tor
if [ -x /etc/rc.d/rc.tor ]; then
/etc/rc.d/rc.tor start
fi

security note
Do not use tor network to access your mail or other confidential data without using some other encryption like ssl (sites with https:// prefix) because you never know who is sitting at tor exit point that you currently use (exit points change all the time – every 10 minutes or so) and what is he/she doing, like sniffing traffic or changing your data as it flows through his/her computer. Read some tor documentation at torproject to understand how it all works.

next:
– install privoxy proxy server for better anonymity protection as it routes DNS requests also into the tor network and is capable of stripping headers that your browser sends with requests

daily time update

to update system time:
# ntpdate zg1.ntp.carnet.hr

to make it update every day create file in /etc/cron.daily
# nano /etc/cron.daily/time_update

then write this in file:
#!/bin/bash
ntpdate zg1.ntp.carnet.hr

exit and save the file (ctrl+x)

and make it executable:
# chmod +x /etc/cron.daily/time_update

linux ftp server cnfiguration – vsftpd

http://www.linuxfocus.org/English/July2004/article341.shtml#341lfindex3

multiple database instances

1.) start dbca (it’s GUI app so it needs $DISPLAY to be set)
# dbca

2.) change /etc/oratab so it has “Y” at the end of all lines representing instances

3.) in startup script:
a) delete ORACLE_SID, it’s not needed any more and
b) add new variable ORAENV_ASK=”YES” – it’s not nessesary to export this variable,
– ORAENV_ASK variable means that oracle won’t look at ORACLE_SID but it’ll search in oratab for instance names

oracle database 11g on Slackware 12.2

mostly taken from
http://roqet.org/oracle_on_slackware.html

Note: Oracle database needs X environment for installation procedure

1.) Create Oracle user and install and management groups (as root):

groupadd dba
groupadd oinstall
adduser oracle #make the initial group oinstall, and additional groups dba,users

2.) unzip and run Oracle Installer (I skipped part with checking system prerequisites and modifying ~/.profile – we’ll see if it works)
– in installer – advanced installation
– enterprize database
– all groups set to dba
– I ran Installer without any parameters so installer failed when checking type of system – it didn’t recognize Slackware linux, but I clicked install anyway so installation continued
– all directories are set to be in /home/oracle/
– got error: “Error in invoking target ‘all_no_orcl’ of makefile ‘/home/oracle/app/oracle/product/11.1.0/db_1/rdbms/lib/ins_rdbms.mk'” and clicked Continue
– there were more errors, but in the end it seems that database runs ok, but now I miss that configuration script in .profiles file, e.g.PATH is not set, but judging by enterprize manager it looks like the database is running
– I even managed to connect to database with TOAD – everything looks fine
– but after restart, database was not started – I have to make a startup script and call it after boot

Errors:
– runInstaller: line 88: /home/oracle/database/install/.oui: Permission denied
#  chmod +x database/install/.oui
– database/install/unzip: Permission denied
# chmod +x database/install/unzip

3.) startup scripts
– /etc/oratab – change N to Y at the end of database path (the end of file) – dbstart starts only those instances with ‘Y’ entry
– set environment variables before calling dbstart:
– make startup script like this:
$ nano ~/start_oracle.sh
– and put these lines in it:
ORACLE_HOME=/home/oracle/app/oracle/product/11.1.0/db_1
ORACLE_SID=orcl
LD_LIBRARY_PATH=$ORACLE_HOME/lib:$ORACLE_HOME/network/lib
export ORACLE_HOME ORACLE_SID LD_LIBRARY_PATH
$ORACLE_HOME/bin/dbstart $ORACLE_HOME

– next make that script executable:
$ chmod +x ~/start_oracle.sh
– and change rc.local so it starts after boot (this must be done as root)
$ echo su - oracle -c /home/oracle/start_oracle.sh >> /etc/rc.d/rc.local

4.) optional – set PATH variable to ease running oracle tools:
$ echo ORACLE_HOME=/home/oracle/app/oracle/product/11.1.0/db_1 >> ~/.bashrc
$ echo PATH=$PATH:$ORACLE_HOME/bin >> ~/.bashrc
$ echo export ORACLE_HOME PATH >> ~/.bashrc

that’s it,
reboot and Oracle Database 11g should be up and running :))

99.) troubleshooting
a) TNS-12555 – listener cannot start – permission denied
– change file permissions for all Oracle binaries
– or for all oracle files:
$ chown oracle:dba $ORACLE_HOME

change ip address, hostname and/or interface

hostname:
/etc/HOSTNAME

ip address:
/etc/rc.d/rc.inet1.conf:
# Config information for eth0:
IPADDR[0]=”192.168.1.1″
NETMASK[0]=”255.255.255.0″
USE_DHCP[0]=””
DHCP_HOSTNAME[0]=””

hostname and ip address:
/etc/hosts

for switching eht0/eth1 check last variable NAME=”eth1″ in:
/etc/udev/rules.d/70-persistent-net.rules
note: if that file is deleted it will be recreated during the boot process.