Linux

Blog

WHM Script usage

Check if “ImageMagick” installed /scripts/checkimagemagick Install “imagemagick” /scripts/installimagemagick Update cpanel /scripts/upcp –force Check perl module /scripts/checkperlmodules Restart cpanel /etc/init.d/cpanel restart Check the position of php.ini php -i | grep php.ini Repair horde /scripts/fullhordereset or /usr/local/cpanel/bin/update-horde –force Repair roundcube /usr/local/cpanel/bin/update-roundcube –force Repair squirrelmail /usr/local/cpanel/bin/update-squirrelmail –force Install newest version of exim /scripts/betaexim Search the log which near 2GB /scripts/biglogcheck Rebuild exim.conf /scripts/buildeximconf View/usr/local/apache/conf/httpd.conf , check the bad user /scripts/checkbadconf Check if support GD /scripts/checkgd Install GD /scripts/installgd Check the max clients of Apache /scripts/checkmaxclients Check Perl version /scripts/checkoldperl Check rsync /scripts/checkrsync Check yum /scripts/checkyum Clear old bound log /scripts/cleanbw Clear old GD and install new version /scripts/cleangd Delete a mySQL database /scripts/dropmysqldb Upgrade Apache /scripts/easyapache Edit…

Blog

Big rise up! – Enable https(SSL)

Author: Calf < https://www.calf.one > https will be a mainstream website protocol , as a  fellow traveller and diao, I love the free lunch , so I found the StartSSL free SSL, the official website is : https://www.startssl.com/ Calf’s tip: Cliek the thumbs can view the big size picture Select “Start Now for Free SSL Certificate” New user select “Sign up”; Select your country and input your email address and then click Sent verification code ,the system will send you a Verification code. Copy the verification code to the StartSSL dialog and click Verification. StartSSL will install the browser certificate. And then choose certificate . “Click here to choose…

Blog

vi commands encyclopedia

Basic vi Commands What is vi? The default editor that comes with the UNIX operating system is called vi (visual editor). [Alternate editors for UNIX environments include pico and emacs, a product of GNU.] The UNIX vi editor is a full screen editor and has two modes of operation: Command mode commands which cause action to be taken on the file, and Insert mode in which entered text is inserted into the file. In the command mode, every character typed is a command that does something to the text file being edited; a character typed in the command mode may…

Blog

Linux clear login and history log

Clear login log [[email protected] root]# echo > /var/log/wtmp #can view ip and etc.. [[email protected] root]# last #now, we can’t view the user login record Clear login failure log [[email protected] root]# echo > /var/log/btmp # we can view the failuew login record [[email protected] root]# lastb # log clear Clear history command record [[email protected] root]# history -c or clear the file of bash_history in user folder [[email protected] root]# echo > ./.bash_history 1.vi /root/history #creat new log file 2.history -c #clear history 3.history -r /root/history.txt #import record 4.history #query the import result example [[email protected] root]# vi /root/history [[email protected] root]# history -c [[email protected] root]# history -r…

Blog

Linux add user and given root authority

Due to not often add user, sometimes forget the parameters, so just copy an article to my blog, when I forgot I can have a look on my blog. 🙂 1、First, use command adduser add a user: #adduser calf //added a named calf user #passwd calf //change password Changing password for user calf. New UNIX password:     //input the new password Retype new UNIX password:  //input the new password again passwd: all authentication tokens updated successfully. 2、Give root authority the way 1 :  modify /etc/sudoers and find below line, remove the remark “#”: ## Allows people in group wheel to run all commands %wheel    ALL=(ALL)    ALL the…

Blog

亚马逊AWS Ubuntu架设VPN

更新源 sudo apt-get update 安装PPTP sudo apt-get install pptpd 修改配置文件 sudo vi  /etc/pptpd.conf 修改localiph和remoteip 编辑DNS sudo vi /etc/ppp/pptpd-option 建立VPN 用户名和密码 sudo vi /etc/ppp/chap-secrets 加入一行(格式为:用户名 服务器名 密码 IP) user * password * 重启服务 sudo /init.d/pptpd restart 修改ipv4转发 sudo vi /etc/sysctl.conf 去掉 net.ipv4.ip_forward=1这行前面的注释符号“#”。 使配置生效: sudo sysctl -p 安装iptables (默认一般已经安装 ) sudo apt-get install iptables 修改 /etc/rc.local文件, 在exit 0之前添加以下语句: iptables -t nat -A POSTROUTING -o eth0 -j MASQUERADE 最后重启下服务器 sudo reboot 等重启的空档,设置一个VPN连接 连接成功,ping一下Google等网站,那流畅,那酸爽!   最后是EC2里面的防火墙设置(安全组):

calf-blog-top