Friday, October 31, 2014

Shell csript linux auto connect ssh to server and deployment

I want deploy code to server. I dont want connect ssh in command. I write shell script linux auto connect to server and cd go to directory project and execute git command or svn command if it done exit connect .

- Step 1:  Install package expect  if not install on my computer.
- Step 2 : create file deploy_project.sh and paste code .
#!/usr/bin/expect
set login "root" # user  login
set addr "192.168.1.44" # ip server 
set pw "123456" # password login ssh 

spawn ssh $login@$addr
expect "$login@$addr\'s password:"
send "$pw\r"
expect "#"
send "cd /var/www/html/project_example\r" # go to directory project
expect "#"
send "git pull\r" # command git pull source code
expect "#"
send "exit\r" # disconnect to server 
interact # close shell
- Step 3 Open terminal cd to directory  run command ./deploy_project.sh

Please have any questions. 

Good Luck !

Thursday, October 30, 2014

Install LAMP Server (Apache, MySQL or MariaDB, PHP) On Ubuntu 14.10/14.04/13.10

LAMP is a combination of operating system and open-source software stack. The acronym LAMP comes from the first letters of Linux, Apache HTTP Server, MySQL or MariaDB database, and PHP/Perl/Python.
In this tutorial, we will see how to setup LAMP server on Ubuntu 14.10 system.

Tuesday, October 28, 2014

10 THINGS TO DO AFTER INSTALLING UBUNTU 14.04 TRUSTY TAHR TO GET A NEAR PERFECT DESKTOP

Ubuntu 14.04 LTS (Trusty Tahr) will be released tomorrow and since many of you will install it as soon as it's released (or maybe you're already using Ubuntu 14.04), here's a list of 10 useful things to do to get a near perfect desktop.


Ubuntu 14.04 things to do

While the tweaks below are targeted at Unity, many of them also work with other Ubuntu flavors like Xubuntu, Kubuntu, Lubuntu or Ubuntu GNOME.

Update: the instructions / things to do below also apply for the latest Ubuntu 14.10 (Utopic Unicorn), except for:
  • 1.2 (Pidgin Indicator is no longer required because Pidgin now ships with a Unity integration plugin; you can still use Pidgin Indicator if you want though);
  • 3.1 (Firefox now supports H224 without any tweaks);
  • 4.1 (you can continue to use Pipelight for various web services that require Silverlight, but that's no longer required for Netflix - to use Netflix with HTML5, simply install Google Chrome and it should work without any additional tweaks - that's now also the case for Ubuntu 14.04).