snipt

Ctrl+h for KB shortcuts

Bash

Ubuntu 12.04 LAMP server up and running with phpmyadmin installed nice and quick!

1
2
3
4
5
6
7
8
#!/bin/bash
sudo apt-get install mysql-server mysql-client
sudo apt-get install apache2
sudo apt-get install php5 libapache2-mod-php5
sudo /etc/init.d/apache2 restart
sudo apt-get install php5-mysql php5-curl php5-gd php5-intl php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl
sudo /etc/init.d/apache2 restart
sudo apt-get install phpmyadmin
https://snipt.net/embed/b8fde2488c189d048f085351633ade5a/
https://snipt.net/raw/b8fde2488c189d048f085351633ade5a/
b8fde2488c189d048f085351633ade5a
bash
Bash
8
2016-09-21T11:41:29
True
False
False
/api/public/snipt/90070/
ubuntu-1204-lamp-server-up-and-running-with-phpmyadmin-installed-nice-and-quick
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a> <a href="#L-6">6</a> <a href="#L-7">7</a> <a href="#L-8">8</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="c">#!/bin/bash</span> </span><span id="L-2"><a name="L-2"></a>sudo apt-get install mysql-server mysql-client </span><span id="L-3"><a name="L-3"></a>sudo apt-get install apache2 </span><span id="L-4"><a name="L-4"></a>sudo apt-get install php5 libapache2-mod-php5 </span><span id="L-5"><a name="L-5"></a>sudo /etc/init.d/apache2 restart </span><span id="L-6"><a name="L-6"></a>sudo apt-get install php5-mysql php5-curl php5-gd php5-intl php-pear php5-imagick php5-imap php5-mcrypt php5-memcache php5-ming php5-ps php5-pspell php5-recode php5-snmp php5-sqlite php5-tidy php5-xmlrpc php5-xsl </span><span id="L-7"><a name="L-7"></a>sudo /etc/init.d/apache2 restart </span><span id="L-8"><a name="L-8"></a>sudo apt-get install phpmyadmin </span></pre></div> </td></tr></table>
apache2, install, lamp, mysql, php, server

Bash

Install Yum

rpm -Uvh http://mirror.centos.org/centos/5/os/x86_64/CentOS/yum-3.2.22-40.el5.centos.noarch.rpm
https://snipt.net/embed/122987a72579dbf221c2e6d98e1350ca/
https://snipt.net/raw/122987a72579dbf221c2e6d98e1350ca/
122987a72579dbf221c2e6d98e1350ca
bash
Bash
1
2016-09-24T09:28:42
True
False
False
/api/public/snipt/57302/
install-yum
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a>rpm -Uvh http://mirror.centos.org/centos/5/os/x86_64/CentOS/yum-3.2.22-40.el5.centos.noarch.rpm </span></pre></div> </td></tr></table>
install, yum

Bash

Install a new Git repo

1
2
3
4
# add this to your .bash_profile
# usage: gitinstall http://github.com/path/to/git.git

function gitinstall(){ git init; git remote add origin "$@"; git config branch.master.remote origin; git config branch.master.merge refs/heads/master; git pull;}
https://snipt.net/embed/9517cb33519115158749a04f0dfe8758/
https://snipt.net/raw/9517cb33519115158749a04f0dfe8758/
9517cb33519115158749a04f0dfe8758
bash
Bash
4
2016-09-24T20:36:00
True
False
False
/api/public/snipt/25561/
install-a-new-git-repo
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="c"># add this to your .bash_profile</span> </span><span id="L-2"><a name="L-2"></a><span class="c"># usage: gitinstall http://github.com/path/to/git.git</span> </span><span id="L-3"><a name="L-3"></a> </span><span id="L-4"><a name="L-4"></a><span class="k">function</span> gitinstall<span class="o">(){</span> git init<span class="p">;</span> git remote add origin <span class="s2">&quot;</span><span class="nv">$@</span><span class="s2">&quot;</span><span class="p">;</span> git config branch.master.remote origin<span class="p">;</span> git config branch.master.merge refs/heads/master<span class="p">;</span> git pull<span class="p">;</span><span class="o">}</span> </span></pre></div> </td></tr></table>
bash, git, install, setup

Ruby

Uninstall version of gem

1
2
3
4
5
#list all versions of a particular gem
gem list GEMNAME

#uninstall a particular version
gem uninstall GEMNAME --version=VERSION
https://snipt.net/embed/5d39879f98886c682f8808b9b044455d/
https://snipt.net/raw/5d39879f98886c682f8808b9b044455d/
5d39879f98886c682f8808b9b044455d
rb
Ruby
5
2016-09-21T18:45:17
True
False
False
/api/public/snipt/25247/
uninstall-version-of-gem
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a> <a href="#L-3">3</a> <a href="#L-4">4</a> <a href="#L-5">5</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a><span class="c1">#list all versions of a particular gem</span> </span><span id="L-2"><a name="L-2"></a><span class="n">gem</span> <span class="n">list</span> <span class="no">GEMNAME</span> </span><span id="L-3"><a name="L-3"></a> </span><span id="L-4"><a name="L-4"></a><span class="c1">#uninstall a particular version</span> </span><span id="L-5"><a name="L-5"></a><span class="n">gem</span> <span class="n">uninstall</span> <span class="no">GEMNAME</span> <span class="o">--</span><span class="n">version</span><span class="o">=</span><span class="no">VERSION</span> </span></pre></div> </td></tr></table>
gem, install, ruby, uninstall

Text only

maven install file

mvn install:install-file -Dfile=<path-to-file> -DgroupId=<group-id>
    -DartifactId=<artifact-id> -Dversion=<version> -Dpackaging=<packaging>
https://snipt.net/embed/d5030e6a1a1fd0ee7ca25fb9eee5f1b8/
https://snipt.net/raw/d5030e6a1a1fd0ee7ca25fb9eee5f1b8/
d5030e6a1a1fd0ee7ca25fb9eee5f1b8
text
Text only
2
2016-09-24T01:41:41
True
False
False
/api/public/snipt/24555/
maven-install-file
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a> <a href="#L-2">2</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a>mvn install:install-file -Dfile=&lt;path-to-file&gt; -DgroupId=&lt;group-id&gt; </span><span id="L-2"><a name="L-2"></a> -DartifactId=&lt;artifact-id&gt; -Dversion=&lt;version&gt; -Dpackaging=&lt;packaging&gt; </span></pre></div> </td></tr></table>
file, install, jar, maven

Bash

Install perl modules

sudo perl -MCPAN -e 'install MIME::Base64'
https://snipt.net/embed/cde0402528fd383cb62a268116151635/
https://snipt.net/raw/cde0402528fd383cb62a268116151635/
cde0402528fd383cb62a268116151635
bash
Bash
1
2016-09-22T10:01:31
True
False
False
/api/public/snipt/18995/
install-perl-modules
<table class="highlighttable"><tr><td class="linenos"><div class="linenodiv"><pre><a href="#L-1">1</a></pre></div></td><td class="code"><div class="highlight"><pre><span id="L-1"><a name="L-1"></a>sudo perl -MCPAN -e <span class="s1">&#39;install MIME::Base64&#39;</span> </span></pre></div> </td></tr></table>
install, module, perl
Copyrighted, illegal, or inappropriate content? Email support@snipt.net.