apt update
apt install -y curl openssh-server ca-certificates postfix
curl -sS https://packages.gitlab.com/install/repositories/gitlab/gitlab-ce/script.deb.sh | sudo bash
apt install gitlab-ce
Open browser and type http://localhost to open web page
Change your root password and login
enjoy~
2018/10/08
2018/07/29
My Grub2 Menu Config
insmod png
insmod part_msdos
insmod fat
insmod ntfs
insmod ext2
set root='hd0,msdos1'
set timeout=10
if loadfont /boot/grub/fonts/unicode.pf2 ; then
set gfxmode=1024x768
insmod efi_gop
insmod efi_uga
insmod vbe
insmod vga
insmod gfxterm
terminal_output gfxterm
fi
if background_image /boot/grub/sakura.png ; then
set color_normal=light-gray/black
set menu_color_normal=black/black
set menu_color_highlight=green/dark-gray
else
set color_normal=white/black
set menu_color_normal=white/black
set menu_color_highlight=green/dark-gray
fi
insmod part_msdos
insmod fat
insmod ntfs
insmod ext2
set root='hd0,msdos1'
set timeout=10
if loadfont /boot/grub/fonts/unicode.pf2 ; then
set gfxmode=1024x768
insmod efi_gop
insmod efi_uga
insmod vbe
insmod vga
insmod gfxterm
terminal_output gfxterm
fi
if background_image /boot/grub/sakura.png ; then
set color_normal=light-gray/black
set menu_color_normal=black/black
set menu_color_highlight=green/dark-gray
else
set color_normal=white/black
set menu_color_normal=white/black
set menu_color_highlight=green/dark-gray
fi
My Grub4Dos menu list v4.6a
color white/black white/black white/black white/black
timeout 10
default 0
color border=0x000000
graphicsmode -1 1024:768
splashimage /night.bmp
title [1]SPFDISK
find /IMG/SPFDISK.IMG
map /IMG/SPFDISK.IMG (fd0)
map --hook
chainloader (fd0)+1
rootnoverify (fd0)
title [2]Ghost 3in1
find /IMG/GHOST.IMG
map /IMG/GHOST.IMG (fd0)
map --hook
chainloader (fd0)+1
rootnoverify (fd0)
timeout 10
default 0
color border=0x000000
graphicsmode -1 1024:768
splashimage /night.bmp
title [1]SPFDISK
find /IMG/SPFDISK.IMG
map /IMG/SPFDISK.IMG (fd0)
map --hook
chainloader (fd0)+1
rootnoverify (fd0)
title [2]Ghost 3in1
find /IMG/GHOST.IMG
map /IMG/GHOST.IMG (fd0)
map --hook
chainloader (fd0)+1
rootnoverify (fd0)
2018/07/06
How to install MRBS on Ubuntu 16.04
1.Install LAMP (Ubuntu Installation Process)
2.sudo su
3.apt update
4.apt install -y phpmyadmin
5.cp /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf
6.service apache2 restart
7.wget https://sourceforge.net/projects/mrbs/files/mrbs/MRBS%201.7.1/mrbs-1.7.1.tar.gz
8.tar zxvf mrbs-1.7.1.tar.gz
9.cd mrbs-1.7.1
10.cp -r web/ /var/www/html/mrbs/
11.nano /var/www/html/mrbs/config.inc.php (Check and modify config)
$timezone = "Asia/Taipei";
$dbsys = "mysql";
$db_host = "localhost";
$db_database = "mrbs";
$db_login = "dbuser";
$db_password = 'dbuserpassword';
12.mysql -uroot -p mrbs < tables.my.sql (import db tables)
13.Launch web browser and enter http://localhost/mrbs to go
2.sudo su
3.apt update
4.apt install -y phpmyadmin
5.cp /etc/phpmyadmin/apache.conf /etc/apache2/conf-available/phpmyadmin.conf
6.service apache2 restart
7.wget https://sourceforge.net/projects/mrbs/files/mrbs/MRBS%201.7.1/mrbs-1.7.1.tar.gz
8.tar zxvf mrbs-1.7.1.tar.gz
9.cd mrbs-1.7.1
10.cp -r web/ /var/www/html/mrbs/
11.nano /var/www/html/mrbs/config.inc.php (Check and modify config)
$timezone = "Asia/Taipei";
$dbsys = "mysql";
$db_host = "localhost";
$db_database = "mrbs";
$db_login = "dbuser";
$db_password = 'dbuserpassword';
12.mysql -uroot -p mrbs < tables.my.sql (import db tables)
13.Launch web browser and enter http://localhost/mrbs to go
2018/06/21
IBM AIX 5.3 Disk and File Check Command
List Disk Partition
host:/> df
List Large Files >1GB
host:/> find . -type f -size +1073741824c -exec ls {} \;
host:/> df
List Large Files >1GB
host:/> find . -type f -size +1073741824c -exec ls {} \;
2018/06/14
How to install SaltStack on Ubuntu 14.04 Server
Salt-Master
apt-get update
curl -L https://bootstrap.saltstack.com -o install_salt.sh
sh install_salt.sh -P -M -N
nano /etc/salt/master
# The address of the interface to bind to:
interface: 123.456.78.9
service salt-master restart
salt-key --finger-all
Local Keys:
master.pem: 94:fc:76:...
master.pub: 38:4f:c7:...
apt-get update
curl -L https://bootstrap.saltstack.com -o install_salt.sh
sh install_salt.sh -P -M -N
nano /etc/salt/master
# The address of the interface to bind to:
interface: 123.456.78.9
service salt-master restart
salt-key --finger-all
Local Keys:
master.pem: 94:fc:76:...
master.pub: 38:4f:c7:...
2018/06/08
SSH for Windows Server 2016
1.Download Win32 OpenSSH from Github
2.Unzip OpenSSH-Win64.zip
3.Move folder to C:\Program Files
4.Open PowerShell.exe in OpenSSH-Win64 folder
File>Open Windows Powershell>Open Windows PowerShell as administrator
2.Unzip OpenSSH-Win64.zip
3.Move folder to C:\Program Files
4.Open PowerShell.exe in OpenSSH-Win64 folder
File>Open Windows Powershell>Open Windows PowerShell as administrator
2018/06/07
How to install Open Falcon on Ubuntu 16.04
Python
sudo su
apt update
apt install -y libsasl2-dev python-dev libldap2-dev libssl-dev
MySQL
apt install -y mysql-server libmysqlclient-dev
Go Lang
curl -O https://storage.googleapis.com/golang/go1.10.2.linux-amd64.tar.gz
tar -xvf go1.10.2.linux-amd64.tar.gz
mv go /usr/local
nano ~/.profile
export PATH=$PATH:/usr/local/go/bin
source ~/.profile
go version
go version go1.10.2 linux/amd64
sudo su
apt update
apt install -y libsasl2-dev python-dev libldap2-dev libssl-dev
MySQL
apt install -y mysql-server libmysqlclient-dev
Go Lang
curl -O https://storage.googleapis.com/golang/go1.10.2.linux-amd64.tar.gz
tar -xvf go1.10.2.linux-amd64.tar.gz
mv go /usr/local
nano ~/.profile
export PATH=$PATH:/usr/local/go/bin
source ~/.profile
go version
go version go1.10.2 linux/amd64
How to install Kubernetes on Ubuntu 16.04
System Preparation
sudo su
apt update && apt install -y apt-transport-https curl ca-certificates software-properties-common
Install Docker 17.03
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/$(. /etc/os-release; echo "$ID") \
$(lsb_release -cs) \
stable"
apt update && apt install -y docker-ce=$(apt-cache madison docker-ce | grep 17.03 | head -1 | awk '{print $3}')
systemctl enable docker
docker info
sudo su
apt update && apt install -y apt-transport-https curl ca-certificates software-properties-common
Install Docker 17.03
curl -fsSL https://download.docker.com/linux/ubuntu/gpg | sudo apt-key add -
add-apt-repository \
"deb [arch=amd64] https://download.docker.com/linux/$(. /etc/os-release; echo "$ID") \
$(lsb_release -cs) \
stable"
apt update && apt install -y docker-ce=$(apt-cache madison docker-ce | grep 17.03 | head -1 | awk '{print $3}')
systemctl enable docker
docker info
2018/05/28
How to install MantisBT on Ubuntu 16.04
sudo su
apt update && apt upgrade -y
apt install -y apache2 libapache2-mod-php7.0 php7.0 php7.0-mysql php7.0-xml php-mbstring mysql-server
mysql -uroot -p
CREATE DATABASE mantisbt;
CREATE USER 'mantisbt'@'localhost' IDENTIFIED BY 'mantisbt';
GRANT ALL PRIVILEGES ON mantis.* TO 'mantisbt'@'localhost' IDENTIFIED BY 'mantisbt' WITH GRANT OPTION;
FLUSH PRIVILEGES;
exit
apt update && apt upgrade -y
apt install -y apache2 libapache2-mod-php7.0 php7.0 php7.0-mysql php7.0-xml php-mbstring mysql-server
mysql -uroot -p
CREATE DATABASE mantisbt;
CREATE USER 'mantisbt'@'localhost' IDENTIFIED BY 'mantisbt';
GRANT ALL PRIVILEGES ON mantis.* TO 'mantisbt'@'localhost' IDENTIFIED BY 'mantisbt' WITH GRANT OPTION;
FLUSH PRIVILEGES;
exit
2018/05/04
How to install Rocket.Chat on Ubuntu Server 16.04
Install required packages
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
echo "deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list
apt update
apt install -y graphicsmagick build-essential mongodb-org nodejs
Start MongoDB
systemctl start mongod
systemctl enable mongod
Download and install Rocket.Chat
cd /opt
wget https://cdn-download.rocket.chat/build/rocket.chat-0.64.0.tgz
tar xzf rocket.chat-0.64.0.tgz
mv bundle Rocket.Chat
cd Rocket.Chat/programs/server
npm install
cd ../..
export ROOT_URL=http://localhost/
export MONGO_URL=mongodb://localhost:27017/rocketchat
export PORT=3000
node main.js
Ctrl+C to stop service
apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv EA312927
echo "deb http://repo.mongodb.org/apt/ubuntu xenial/mongodb-org/3.2 multiverse" | sudo tee /etc/apt/sources.list.d/mongodb-org-3.2.list
apt update
apt install -y graphicsmagick build-essential mongodb-org nodejs
Start MongoDB
systemctl start mongod
systemctl enable mongod
Download and install Rocket.Chat
cd /opt
wget https://cdn-download.rocket.chat/build/rocket.chat-0.64.0.tgz
tar xzf rocket.chat-0.64.0.tgz
mv bundle Rocket.Chat
cd Rocket.Chat/programs/server
npm install
cd ../..
export ROOT_URL=http://localhost/
export MONGO_URL=mongodb://localhost:27017/rocketchat
export PORT=3000
node main.js
Ctrl+C to stop service
2018/04/24
2018/04/10
How to install Prometheus and Grafana on Ubuntu Server 16.04
Monitor Server
sudo su
sudo apt update
sudo apt -y upgrade
Install Go
curl -O https://storage.googleapis.com/golang/go1.10.1.linux-amd64.tar.gz
tar -xvf go1.10.1.linux-amd64.tar.gz
mv go /usr/local
nano ~/.profile
export PATH=$PATH:/usr/local/go/bin
source ~/.profile
go version
go version go1.10.1 linux/amd64
sudo su
sudo apt update
sudo apt -y upgrade
Install Go
curl -O https://storage.googleapis.com/golang/go1.10.1.linux-amd64.tar.gz
tar -xvf go1.10.1.linux-amd64.tar.gz
mv go /usr/local
nano ~/.profile
export PATH=$PATH:/usr/local/go/bin
source ~/.profile
go version
go version go1.10.1 linux/amd64
2018/04/03
How to install LibreNMS on Ubuntu Server 16.04
System update and install package
sudo su
apt install software-properties-common
add-apt-repository ppa:ondrej/php
apt update
apt install -y apache2 composer fping git graphviz imagemagick libapache2-mod-php7.2 mariadb-client mariadb-server mtr-tiny nmap php7.2-cli php7.2-curl php7.2-gd php7.2-json php7.2-mbstring php7.2-mcrypt php7.2-mysql php7.2-snmp php7.2-xml php7.2-zip python-memcache python-mysqldb rrdtool snmp snmpd whois sendmail
Configure DB
mysql -uroot -p
CREATE DATABASE librenmsdb;
CREATE USER 'librenmsuser'@'localhost' IDENTIFIED BY 'librenmspwd';
GRANT ALL PRIVILEGES ON librenmsdb.* TO 'librenmsuser'@'localhost';
exit
nano /etc/mysql/mariadb.conf.d/50-server.cnf
innodb_file_per_table=1
sql-mode=""
lower_case_table_names=0
/lib/systemd/systemd-sysv-install enable mysql
systemctl restart mysql
sudo su
apt install software-properties-common
add-apt-repository ppa:ondrej/php
apt update
apt install -y apache2 composer fping git graphviz imagemagick libapache2-mod-php7.2 mariadb-client mariadb-server mtr-tiny nmap php7.2-cli php7.2-curl php7.2-gd php7.2-json php7.2-mbstring php7.2-mcrypt php7.2-mysql php7.2-snmp php7.2-xml php7.2-zip python-memcache python-mysqldb rrdtool snmp snmpd whois sendmail
Configure DB
mysql -uroot -p
CREATE DATABASE librenmsdb;
CREATE USER 'librenmsuser'@'localhost' IDENTIFIED BY 'librenmspwd';
GRANT ALL PRIVILEGES ON librenmsdb.* TO 'librenmsuser'@'localhost';
exit
nano /etc/mysql/mariadb.conf.d/50-server.cnf
innodb_file_per_table=1
sql-mode=""
lower_case_table_names=0
/lib/systemd/systemd-sysv-install enable mysql
systemctl restart mysql
2018/03/23
Linux Machine Hardware Information Check Tool
dmidecode
https://www.nongnu.org/dmidecode/
Release download
http://download.savannah.gnu.org/releases/dmidecode/
apt-get install dmidecode
or
yum install dmidecode
https://www.nongnu.org/dmidecode/
Release download
http://download.savannah.gnu.org/releases/dmidecode/
apt-get install dmidecode
or
yum install dmidecode
2018/02/12
How to install IKEv2 VPN Service on Ubuntu Server 16.04
Download install script from Github
wget --no-check-certificate https://raw.githubusercontent.com/quericy/one-key-ikev2-vpn/master/one-key-ikev2.sh
Modify script file permission
chmod +x one-key-ikev2.sh
Run script
bash one-key-ikev2.sh
Set Server Configuration
Reference URL: https://github.com/quericy/one-key-ikev2-vpn
Installation completed
wget --no-check-certificate https://raw.githubusercontent.com/quericy/one-key-ikev2-vpn/master/one-key-ikev2.sh
Modify script file permission
chmod +x one-key-ikev2.sh
Run script
bash one-key-ikev2.sh
Set Server Configuration
Reference URL: https://github.com/quericy/one-key-ikev2-vpn
Installation completed
訂閱:
文章 (Atom)