Ubuntu – How to Install Apple Safari in Ubuntu 12.04, 12.10, 13.10, 14.04, 14.10
Apple Safari Installation in Ubuntu
Firstly install PlayOnLinux, which allow easy ... Read more
1 |
sudo pip install pylibmc |
1 |
sudo apt-get install -y beanstalkd |
1 2 3 4 5 |
# install python-pip sudo apt-get install -y python-pip # install cql driver sudo pip install cql |
1 2 3 4 5 |
# install easy_install sudo apt-get install -y python-setuptools # install python-pip sudo apt-get install -y python-pip |
1 |
sudo pip install pycassa |
1 |
vmstat 1 |
1 2 |
sudo apt-get install -y htop sudo htop |
1 2 |
sudo apt-get install -y atop sudo atop |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 |
#php sudo apt-get install -y php5 #php5 with apache2 sudo apt-get install -y libapache2-mod-php5 #optional: execute standalone php scripts sudo apt-get install -y php5-cli #mysql driver for PHP5 sudo apt-get install -y php5-mysql #unzip sudo apt-get install -y unzip # mysql sudo apt-get install -y mysql # apache webserver sudo apt-get install -y apache2 # create download directory mkdir -p ~/build/wordpress cd ~/build/wordpress # download wget http://wordpress.org/latest.zip unzip -qo latest.zip cd wordpress # create .htaccess file for nice URL cat > .htaccess <<"_EOF_" # BEGIN WordPress <IfModule mod_rewrite.c> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . /index.php [L] </IfModule> # END WordPress _EOF_ # check .htaccess contents #cat ./wordpress/.htaccess #ls -l /var/www/ # create wp config file cp wp-config-sample.php wp-config.php #database credentials wp_database="wpzdb" wp_user="wpz" wp_password="wpzpassword" # create user - inline in bash echo " CREATE DATABASE IF NOT EXISTS $wp_database; CREATE USER '$wp_user'@'localhost' IDENTIFIED BY '$wp_password'; CREATE USER '$wp_user'@'127.0.0.1' IDENTIFIED BY '$wp_password'; GRANT ALL ON $wp_database.* TO '$wp_user'@'localhost' IDENTIFIED BY '$wp_password'; GRANT ALL ON $wp_database.* TO '$wp_user'@'127.0.0.1' IDENTIFIED BY '$wp_password'; "|mysql -u root --password=root #set database credentials in wp-config.php sed -i "s/define('DB_NAME', 'database_name_here');/define('DB_NAME', '$wp_database');/ig" wp-config.php sed -i "s/define('DB_USER', 'username_here');/define('DB_USER', '$wp_user');/ig" wp-config.php sed -i "s/define('DB_PASSWORD', 'password_here');/define('DB_PASSWORD', '$wp_password');/ig" wp-config.php #copy wordpress files to the /var/www directory cd .. sudo cp -r wordpress/* /var/www/ sudo chown www-data:www-data -R /var/www # Go to http://localhost to finish up installation #in case of errors, check if the apache webserver and mysql are running ps -ef|grep -E "apache2|mysql" |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 |
# add cassandra sources to /etc/apt/sources.list.d/cassandra.sources.list # cassandra version 21x sudo tee /etc/apt/sources.list.d/cassandra.sources.list <<_EOF_ deb http://www.apache.org/dist/cassandra/debian 21x main deb-src http://www.apache.org/dist/cassandra/debian 21x main _EOF_ # check if file written properly #cat /etc/apt/sources.list.d/cassandra.sources.list # add apache cassandra keys gpg --keyserver keyserver.ubuntu.com --recv-keys 4BD736A82B5C1B00 gpg --export --armor 4BD736A82B5C1B00 | sudo apt-key add - gpg --keyserver keyserver.ubuntu.com --recv-keys F758CE318D77295D gpg --export --armor F758CE318D77295D | sudo apt-key add - #sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 4BD736A82B5C1B00 # update repository sudo apt-get update # install sudo apt-get install -y cassandra # More sane default configurations - the default 50% free memory allocation is too much for me if [ "`grep 'MAX_HEAP_SIZE="' /etc/default/cassandra`" == "" ] ; then sudo tee -a /etc/default/cassandra <<"_EOF_" # Set the Max Memory used by Cassandra, change to whatever value you like MAX_HEAP_SIZE="700M" HEAP_NEWSIZE="200M" # Performance Tuning # see also : http://wiki.apache.org/cassandra/PerformanceTuning JVM_OPTS="$JVM_OPTS -XX:+UseThreadPriorities" # To lower compaction priority JVM_OPTS="$JVM_OPTS -XX:ThreadPriorityPolicy=42" # To lower compaction priority JVM_OPTS="$JVM_OPTS -Dcassandra.compaction.priority=1" # To lower compaction priority JVM_OPTS="$JVM_OPTS -XX:+UseCompressedOops" # enables compressed references, reducing memory overhead on 64bit JVMs _EOF_ fi; # restart Cassandra sudo service cassandra restart # check Cassandra status sudo service cassandra status sudo /etc/init.d/cassandra status # in case of errors, check the cassandra log files ls -l /var/log/cassandra/ #total 7228 #-rw------- 1 root root 3193386 Apr 10 14:33 output.log #-rw------- 1 cassandra cassandra 4194769 Apr 10 14:33 system.log # less /var/log/cassandra/system.log # Optional - Get Version Info about the running Cassandra Instance # 1. check Cassandra version using nodetool (best option) nodetool -h localhost version # 2. check Cassandra version using debian package manager dpkg -s cassandra |grep Version # 3. check Cassandra version using cassandra-cli and expect module sudo apt-get install -y expect expect -c "spawn cassandra-cli;expect \"exit\";send \"quit;\r\n\";" |
1 |
find . -mtime +30 -exec rm {} \; |
1 2 3 4 5 6 7 8 9 10 11 12 13 |
# create download directory mkdir -p ~/build/cassandra-cluster-admin cd ~/build/cassandra-cluster-admin # download git clone https://github.com/sebgiroux/Cassandra-Cluster-Admin # copy to web hosting directory - typically /var/www/ sudo cp -r Cassandra-Cluster-Admin /var/www/cassandra sudo chown -R www-data:www-data /var/www/cassandra #In a web browser, go to http://localhost/cassandra/ # enjoy :) |
1 |
cd - |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# download and dbeaver mkdir -p ~/build/dbeaver cd ~/build/dbeaver # download wget http://dbeaver.jkiss.org/files/dbeaver_2.1.1_amd64.deb sudo dpkg -i dbeaver_2.1.1_amd64.deb # link beaver executable sudo ln -s /usr/share/dbeaver/dbeaver /usr/local/bin/dbeaver # download jdbc drivers - which also include support Cassandra # also wget http://dbeaver.jkiss.org/files/driver-pack-2.1.1.zip unzip driver-pack-2.1.1.zip -d driver-pack sudo cp -r driver-pack/* /usr/share/dbeaver # start DBeaver dbeaver # No user/password needed for test installation of cassandra |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 |
# create download directories mkdir -p ~/build/jetty cd ~/build/jetty # download version="9.0.0.v20130308" wget -O jetty-distribution-$version.tar.gz "http://eclipse.org/downloads/download.php?file=/jetty/stable-9/dist/jetty-distribution-$version.tar.gz&r=1" # extract the archive - creates directory jetty-distribution-.... tar -xvf jetty-distribution-$version.tar.gz # rename jetty directory sudo mv jetty-distribution-$version /usr/local # create jetty user sudo useradd -U -s /bin/false jetty # Copy Jetty script to run as service sudo chown -R jetty:jetty /opt/jetty # move jetty.sh to init.d sudo cp /opt/jetty/bin/jetty.sh /etc/init.d/jetty # create /etc/default/jetty sudo sh -c ' printf " JAVA_HOME=/usr/java/default # Path to Java NO_START=0 # Start on boot JETTY_HOST=0.0.0.0 # Listen to all hosts JETTY_PORT=8080 # Run on this port JETTY_USER=jetty # Run as this user " > /etc/default/jetty' # make webapps writable sudo chmod o+w /etc/default/jetty/webapps # check if the installation settings are ok /opt/jetty/bin/jetty.sh check # Start Jetty as service sudo service jetty start # Start Jetty as service sudo service jetty stop # the server runs on the default port of 8080 # http://localhost:8080/ # To let Jetty automatically start on reboot execute sudo update-rc.d jetty defaults # deploy an app cd myapp.war /opt/jetty/webapps #In case port conflicts, you can check wich application is blocking port 8080 sudo netstat -lnptu|grep ":8080" # monitor jetty log files ls -l /opt/jetty/logs |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 |
# create build directory mkdir -p ~/build/wso2carbon cd ~/build/wso2carbon # download last wso2 library wget https://dl.dropbox.com/s/ji3srheacuvgl6t/wso2carbon-4.0.0-SNAPSHOT.zip # unzip unzip wso2carbon-4.0.0-SNAPSHOT.zip # set execute rights - they are already set correctly :) #chmod +x wso2carbon-4.0.0-SNAPSHOT/bin/wso2server.sh # create directories to copy the runtime data sudo mkdir -p /var/lib/wso2carbon sudo mv wso2carbon-4.0.0-SNAPSHOT /var/lib/wso2carbon sudo ln -s /var/lib/wso2carbon/wso2carbon-4.0.0-SNAPSHOT/bin/wso2server.sh /usr/local/bin/wso2server.sh # execute wso2server.sh |