1. Install mongodb
follow the link below to install mongodb
http://docs.mongodb.org/manual/tutorial/install-mongodb-on-ubuntu/
2. Install php5, php-pear
>apt-get install php5 php-pear
3. Install php-mongo
http://www.php.net/manual/en/mongo.installation.php
4. download rockmongo and the unzip and put in /var/www
http://rockmongo.com/downloads
5. restart apache2 mongodb
>service apache2 restart
>service mongodb restart
(If mongodb is locked, please check below link)
http://blog.brianbuikema.com/2011/01/mongodb-ubunto-overview-installation-setup-dev-python-2/
6. Login with admin/admin on http://localhost/rockmongo
(Modify config.php to change login username/password)
個人在學習Linux過程當中的個人筆記,提供個人及有需要的人查閱,若有錯誤歡迎提供指正,謝謝。 This Blog recorded notes about my learning Linux and provides myself and others reference. If there are any incorrect information, welcome to leave a message to correct me, Thanks.
2012年9月27日 星期四
2012年8月30日 星期四
Disable ping response in Linux
sysctl -w net.ipv4.icmp_echo_ignore_all=1http://www.linuxarticles.org/2010/10/disable-ping-response-in-linux/
2012年8月29日 星期三
Install mongodb on Ubuntu
1. import public key
Reference: http://docs.mongodb.org/manual/tutorial/install-mongodb-on-debian-or-ubuntu-linux/
sudo apt-key adv --keyserver keyserver.ubuntu.com --recv 7F0CEB102. create /etc/apt/sources.list.d/10gen.list
deb http://downloads-distro.mongodb.org/repo/ubuntu-upstart dist 10gen3.
sudo apt-get update4.
sudo apt-get install mongodb-10gen
Reference: http://docs.mongodb.org/manual/tutorial/install-mongodb-on-debian-or-ubuntu-linux/
tsocks
1. install epel first
http://fedoraproject.org/wiki/EPEL
1. insatll tsocks
http://fedoraproject.org/wiki/EPEL
1. insatll tsocks
yum install tsocks2. add file /etc/tsocks.conf
server = 127.0.0.1 server_type = 5 server_port = 12343. establish ssh tunnel
ssh -D 1234 user@xxx.remote.host4. wget with socks proxy
tsocks wget http://get.something5. you might want to unset the http_proxy variable
unset http_proxy
2012年7月23日 星期一
Install MediaWiki
1. Install mysql, mysql-server, httpd
#yum install mysql mysql-server httpd
2. start mysql server
#service mysqld start
3. change mysql root password
#mysqladmin ping -u root password 'newpassword'
Enter password: (just press Enter)
mysqld is alive
(The mysql root password was changed to newpassword)
4. Download MediaWiki
http://www.mediawiki.org/wiki/Download
5. Extract to /var/www/html/wiki
#cd /var/www/html
#mkdir wiki
#copy all files intol wiki foler
6. using browser open http://127.0.0.1/wiki
follow the instruction step by step to install MediaWiki
(Note. If install on CentOS 5, must install php53-common and php53-mysql)
7. Backup, using the script
http://www.mediawiki.org/wiki/User:Megam0rf/WikiBackup
schedule the script on crontab weekly
http://www.mediawiki.org/wiki/Manual:Backing_up_a_wiki
http://www.mediawiki.org/wiki/Manual:Restoring_a_wiki_from_backup
#yum install mysql mysql-server httpd
2. start mysql server
#service mysqld start
3. change mysql root password
#mysqladmin ping -u root password 'newpassword'
Enter password: (just press Enter)
mysqld is alive
(The mysql root password was changed to newpassword)
4. Download MediaWiki
http://www.mediawiki.org/wiki/Download
5. Extract to /var/www/html/wiki
#cd /var/www/html
#mkdir wiki
#copy all files intol wiki foler
6. using browser open http://127.0.0.1/wiki
follow the instruction step by step to install MediaWiki
(Note. If install on CentOS 5, must install php53-common and php53-mysql)
7. Backup, using the script
http://www.mediawiki.org/wiki/User:Megam0rf/WikiBackup
schedule the script on crontab weekly
http://www.mediawiki.org/wiki/Manual:Backing_up_a_wiki
http://www.mediawiki.org/wiki/Manual:Restoring_a_wiki_from_backup
2012年7月16日 星期一
install python setuptools (easy_install)
1. Download .egg from http://pypi.python.org/pypi/setuptools/ (according your python version)
2. using sh to execute .egg file
2. using sh to execute .egg file
2012年7月12日 星期四
replace new line (\n) using sed
sed ':a;N;$!ba;s/\n/ /g' filereference:
http://stackoverflow.com/questions/1251999/sed-how-can-i-replace-a-newline-n
訂閱:
文章 (Atom)