05 May
2019

[src build] old GCC compile

also on the old linux box

■gcc-4.6.4

tarx gcc-4.6.4.tar.gz
cd gcc-4.6.4
./contrib/download_prerequisites
cd ..
mkdir build
cd build
../gcc-4.6.4/configure --prefix=/usr/local/gcc-4.6.4 --enable-languages=c,c++,objc --disable-bootstrap
/usr/local/bin/make
/usr/local/bin/make install

vi ~/.bashrc
export PATH="/usr/local/gcc-4.6.4/bin:$PATH"
export LD_LIBRARY_PATH="/usr/local/gcc-4.6.4/lib:$LD_LIBRARY_PATH"
source ~/.bashrc

gcc -v
g++ -v


Posted by unchor at 18:39 | Comments (0)
12 May
2019

[ubuntu] setup & configurations

also on the old linux box

■version

uname -a
cat /etc/os-release


■hostname
vi /etc/hostname
vi /etc/hosts
hostnamectl
hostname


■更新
apt update
apt upgrade
apt dist-upgrade
apt autoremove
apt autoclean


■listen
netstat -lnt


■logwatch
apt-get install logwatch


■firewall (Uncomplicated FireWall)
ufw status verbose
ufw app list
ufw enable
ufw allow 'Apache Full'
ufw status numbered


■時刻系
date
timedatectl
apt-get install ntp
timedatectl
ntpq -p


■postfix
apt-get install postfix
apt install mailutils
postconf | grep mail_version
postqueue -p


■apache
apt install apache2
a2enmod ssl
service apache2 restart
apt-get install letsencrypt python-letsencrypt-apache
letsencrypt --apache


■bind
apt-get install -y bind9


■aide
apt install aide
cd /var/lib/aide
aide.wrapper --init
cp -p /var/lib/aide/aide.db.new /var/lib/aide/aide.db


Posted by unchor at 10:54 | Comments (0)