http://hongkong2000.no-ip.org:8888/
cd ~
yum install python-setuptools MySQL-python httpd mysql mysql-server mysql-devel git memcached ntp vim -y
easy_install pip
pip install pytz python-dateutil jinja2 markdown2 termcolor python-memcached requests chardet dropbox google-api-python-client pygeoip
service httpd start
service mysqld start
service ntpd start
# mysqladmin -u root password [NEW PASSWORD]
vim /etc/sysconfig/memcached
service memcached start
chkconfig --level 2345 mysqld on
chkconfig --level 2345 httpd on
chkconfig --level 2345 memcached on
chkconfig --level 2345 ntpd on
## rpm install
wget http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
rpm -i http://packages.sw.be/rpmforge-release/rpmforge-release-0.5.2-2.el6.rf.x86_64.rpm
yum install htop screen -y
yum install git -y ## I fail to installthis.
wget https://gist.github.com/anandpdoshi/3817923/raw/badb4ddfda16a77ed763b6740aa5d201686cfd55/install_erpnext.py
python install_erpnext.py
## change owner
run chown -R apache:apache *
## soft link a file
touch erpnext.conf ## my file is empty
ln -s /erpnextFolder/erpnext.conf /etc/httpd/conf.d/erpnext.conf
restart apache service
## set schedudle
crontab -e
*/3 * * * * cd /erpnextFolder lib/wnf.py --run_scheduler >> /var/log/erpnext-sch.log 2>&1
0 */6 * * * cd /erpnextFolder && python lib/wnf.py --backup >> /var/log/erpnext-backup.log 2>&1
## install python in apache
yum install mod_python
vi /etc/httpd/conf/httpd.conf
LoadModule python_module modules/mod_python.so
setenforce 0
/erpnextFolder/lib/wnf.py --domain localhost:8888
## set firewall
iptables -I INPUT 1 -p tcp --dport 8888 -j ACCEPT
service iptables save
## set virtual host
vi /etc/httpd/conf/httpd.conf
Listen 8888
NameVirtualHost *:8888
<VirtualHost *:8888>
ServerName localhost
DocumentRoot /erpnext/public/
AddHandler cgi-script .cgi .xml .py
AddType application/vnd.ms-fontobject .eot
AddType font/ttf .ttf
AddType font/otf .otf
AddType application/x-font-woff .woff
<Directory /erpnext/public/>
# directory specific options
Options -Indexes +FollowSymLinks +ExecCGI
# directory's index file
DirectoryIndex web.py
AllowOverride all
Order Allow,Deny
Allow from all
# rewrite rule
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-l
RewriteRule ^([^/]+)$ /web.py?page=$1 [QSA,L]
</Directory>
</VirtualHost>
start browser http://localhost:8888
login as user: Administrator and password: admin
沒有留言:
張貼留言