1. yum install vsftpd ftp -y
2. vi /etc/vsftpd/vsftpd.conf with following changes:
## Set to "NO" ##
anonymous_enable=NO
## Uncomment ##
ascii_upload_enable=YES
ascii_download_enable=YES
## Uncomment - Enter your Welcome message - This is optional ##
ftpd_banner=Welcome to UNIXMEN FTP service.
## Add at the end of this file ##
use_localtime=YES
3. systemctl restart vsftpd
4. systemctl enable vsftpd
Monday, July 13, 2015
Saturday, June 27, 2015
Install LAMP on Centos 7.1
Install Apache
Install MySQL
Install PHP
Install PHPmyadmin
- yum install httpd
- systemctl start httpd.service
- systemctl enable httpd.service
Install MySQL
- yum install mariadb-server mariadb
- systemctl start mariadb
- mysql_secure_installation
- systemctl enable mariadb.service
Install PHP
- yum install php php-mysql
- systemctl restart httpd.service
Install PHPmyadmin
- yum install epel-release
- yum install phpmyadmin
- systemctl restart httpd.service
Thursday, June 25, 2015
Monday, June 22, 2015
Install Elasticsearch on Centos 7.1
- Download Current Java Runtime Environment from: http://www.oracle.com/technetwork/java/javase/downloads/jre8-downloads-2133155.html
- sudo rpm -Uvh jre-8u45-linux-x64.rpm
- java -version
- sudo rpm -Uvh https://download.elastic.co/elasticsearch/elasticsearch/elasticsearch-1.6.0.noarch.rpm
- Define network.host: localhost in /etc/elasticsearch/elasticsearch.yml
- sudo systemctl daemon-reload
- sudo systemctl enable elasticsearch.service
- sudo systemctl start elasticsearch.service
- Execute curl -XGET 'http://localhost:9200/_cluster/health?pretty=true' to make sure the server is up and running
Monday, May 25, 2015
Logrotate uses 100% CPU issue on CentOS
A typical /var/lib/logrotate.status looks like:
logrotate state -- version 2
"/var/log/daemon.log" 2015-5-9
"/var/log/portage/elog/summary.log" 2015-5-9
"/var/log/mysql/mysql.err" 2015-5-9
"/var/log/mysql/mysql.log" 2015-5-9
"/var/log/mysql/mysqld.err" 2015-5-9
"/var/log/atop/dummy_before" 2015-5-25
"/var/log/atop/dummy_after" 2015-5-25
"/var/log/net-snmpd.log" 2015-5-9
"/var/log/xinetd.log" 2015-5-23
"/var/log/wtmp" 2015-5-9
It is a small file say hundred bytes, but the size may reaches megabytes if there are some config errors.
logrotate state -- version 2
"/var/log/daemon.log" 2015-5-9
"/var/log/portage/elog/summary.log" 2015-5-9
"/var/log/mysql/mysql.err" 2015-5-9
"/var/log/mysql/mysql.log" 2015-5-9
"/var/log/mysql/mysqld.err" 2015-5-9
"/var/log/atop/dummy_before" 2015-5-25
"/var/log/atop/dummy_after" 2015-5-25
"/var/log/net-snmpd.log" 2015-5-9
"/var/log/xinetd.log" 2015-5-23
"/var/log/wtmp" 2015-5-9
It is a small file say hundred bytes, but the size may reaches megabytes if there are some config errors.
Following command can be used to check the configuration of logrotate without change anything:
sudo /usr/sbin/logrotate -d /etc/logrotate.conf
reading config file /etc/logrotate.conf
including /etc/logrotate.d
reading config file daemon
reading config info for /var/log/daemon.log
reading config file elog-save-summary
reading config info for /var/log/portage/elog/summary.log
reading config file mysql
...
It may indicate a bad logrotate.status file if the command hangs with a huge logrotate status file,
To fix the problem, simply delete the logrotate.status. The logrotate will re-create a new one for you.
Sunday, April 26, 2015
SVN client side problems
If there is a performance or strange issue on a specific tree try the following:
- In Windows, delete the roaming profile folder %AppData%\Subversion.
- Rename your current tree then chekout a fresh copy to work with. Then copy any uncommitted files from the old (renamed) tree to the new tree.
Monday, January 12, 2015
Setup Color Scheme Distinguished For Vim
Run mkdir -p ~/.vim/colors
Download distinguished.vim and move to the directory.
Add following to ~/.vimrc
syntax on
colorscheme distinguished
Append following to ~/.bashrc
export TERM=xterm-256color
Run . ~/.bashrc to bring up the term setting.
For more schemes examples see http://www.vimninjas.com/2012/08/26/10-vim-color-schemes-you-need-to-own
Download distinguished.vim and move to the directory.
Add following to ~/.vimrc
syntax on
colorscheme distinguished
Append following to ~/.bashrc
export TERM=xterm-256color
Run . ~/.bashrc to bring up the term setting.
For more schemes examples see http://www.vimninjas.com/2012/08/26/10-vim-color-schemes-you-need-to-own
Subscribe to:
Posts (Atom)