Posts

Showing posts from April, 2017

screen command on linux

To install screen on linux For centos/RHEL base system sudo yum install screen -y For ubuntu base system sudo apt-get install screen -y screen command useful for wget,ryncs not lose session, when you detach it. For example, create the screen with title $ screen -t 'zimbra' ssh [email protected] pressing "ctrl+a" n: next the screen (switch between screen) pressing "ctrl+a" p: previous the screen (switch between screen) pressing "ctrl+a" x : lock the screen pressing "ctrl+a" k: kill the screen pressing ctrl+a d : deattach To list the screen [huupv@huupv ~]$ screen -ls There is a screen on:     31083.pts-0.huupv    (Detached) 1 Socket in /var/run/screen/S-huupv. To resume the screen screen -r 31083 How to deattached screen with Attached status [huupv@localhost]$ screen -ls The output There is a screen on: 20655.pts-4.ra3 (Attached)1 Socket in /var/run/screen/S-huupv. [huupv@localhost]$ screen -r -d 20655.pts-4.ra3 Error

How to install ibus-bogo on fedora 25

Image
How to install ibus-bogo on fedora 25. I'm running commands as privileged ! To download ibus-bogo-0.4-12.fc26.noarch.rpm wget https://kojipkgs.fedoraproject.org//packages/ibus-bogo/0.4/12.fc26/noarch/ibus-bogo-0.4-12.fc26.noarch.rpm To install ibus-bogoon fedora 25 sudo rpm -ivh ibus-bogo-0.4-12.fc26.noarch.rpm  To configure ibus-bogo on fedora 25 ibus-daemon & ibus restart ibus-setup  Note: for program writen QT, example: skype... vim ~/.bash_profile The content as following: export GTK_IM_MODULE=ibus export QT4_IM_MODULE=xim export QT_IM_MODULE=xim export XMODIFIERS=@im=ibus To after, logout and login. Thanks for reading!

How to install mediawiki on centos 6

Image
Links to below you maybe likes: How to install php7 on centos 6 How to install and configure redmine on centos 6 How to owncloud 9 install ssl certificate centos 7 How To Install the BIND DNS Server on CentOS 6 KeepAlived IP Failover on CentOS & Red Hat How to install mediawiki on centos 6 To require nginx php MySQL Step 1: To update and install epel repo, ntpd #yum update -y #yum install -y epel-release #yum install -y ntp #chkconfig ntpd on #ntpdate pool.ntp.org #service ntpd start Step 2: To install the dependencies #yum install gd sendmail gcc pcre yum-utils wget Step 3:  To install php7 for nginx remi centos 6 Step 4: To install ImageMagick #yum install php-mbstring php-fpm php-devel php-mysql php-pear ImageMagick ImageMagick-devel --enablerepo=remi-php70 #pecl install imagick #echo "extension=imagick.so" > /etc/php.d/imagick.in Step 5: To enable module php-mbstring for nginx #find / -name mbstring.so The result /opt/remi/php70/roo

Linux basic commands

Linux basic commands How to check version Ubuntu lsb_release -a How to check to distribute cat /etc/*release How to check CPU information cat /proc/cpuinfo How to check PCI devices lspci How to list all USB devices lsusb How to get PC name from IP nmblookup -A <ip> nbtscan <ip> How many connect on server who -H How many core processor nproc How to check full CPU information lscpu  How to create new user adduser huupv passwd huupv For centos usermod -aG wheel huupv For ubuntu echo "huupv ALL=(ALL) ALL" >> /etc/sudoers How to find UUID disk blkid /dev/sda6 lsblk -f To continuous....

How to install php7 on centos 6

Image
How to install php7 on centos 6, I'm use remi repo to install remi-php70. I'm running commands as root account. To install php7  yum install wget yum-utils wget http://rpms.famillecollet.com/enterprise/remi-release-6.rpm rpm -Uvh remi-release-6.rpm yum-config-manager --enable remi-php70 yum install php --enablerepo=remi-php70 To check for available repositories yum repolist For example: To install php7 for nginx ( Due to, nginx use php-fpm and php-mysql) yum install php-fpm php-mysql --enablerepo=remi-php70 Thanks for reading! How to install php7 on centos 6

How to install and configure redmine on centos 6

Image
How to install and configure redmine on centos 6. I'm running commands as root account! Links to below you maybe likes: How to install php7 on centos 6 How to install and configure redmine on centos 6 How to owncloud 9 install ssl certificate centos 7 How To Install the BIND DNS Server on CentOS 6 KeepAlived IP Failover on CentOS & Red Hat To require install redmine on centos 6 CentOS is installed and works Nginx   is installed and works MySQL is installed and works Your are logged as root To install the the dependence packages yum update yum install -y wget gcc gcc-c++ mysql-server mysql-devel openssl-devel readline-devel zlib-devel curl-devel libxslt-devel pcre ImageMagick-devel yum install -y epel-release  yum install -y ntp chkconfig ntpd on ntpdate pool.ntp.org service ntpd start To install ruby on centos 6 cd /usr/local/src/ wget -qO- https://cache.ruby-lang.org/pub/ruby/stable/ruby-2.3.4.tar.gz | tar xvz cd ruby-2.3.4/ ./configure --disable-inst

How to send email using mail command in linux

Image
in my post, i'm use mail command to send message email. mail -s "Subject title huuphan.com" -S [email protected] <<EOF ---------------------------------------- The content email Hello phan van huu My site: huuphan.com ----------------------------------------- EOF The script sending 100 email from command. #!/bin/sh i=1 for (( i = 1 ; i <= 100 ; i++ )); do  echo "Test Mail $i, Send from mail.huuphan.com" | mailx -v -r "[email protected]" -s "Test Mail $i" -a "/tmp/quotausage" -S smtp="mail.huuphan.com:25" -S smtp-auth=login -S smtp-auth-user="[email protected]" -S smtp-auth-password="123456789" -S ssl-verify=ignore -S nss-config-dir=/etc/ssl/certs [email protected],[email protected] done