Pencarian

Rss Posts

 

 

 

MepSQL Debs for Ubuntu now released – courtesy of cool tweaks to the build system.

Feb 19, 2011

After another week of hacking on MepSQL the DEB files for Ubuntu are now available.(MepSQL is my new “just a hobby” MySQL fork project.)
The Download page has instructions on how to install the packages with a simple apt-get install command. Debian packages will appear soon as they are now easy to add – I mostly just need to add new Amazon images for each.
read more

Ubuntu Upstart for automatic MySQL start and stop

Dec 25, 2010

Here at Recorded Future we use Ubuntu (running on Amazon EC2), but so far we have not explored Ubuntu Upstart that much. During the holidays I made an effort to get acquainted with Upstart and to implement proper MySQL start and stop with it.If you do not know Upstart, this is the way you start and stop services in Ubuntu, and it serves the same purpose as the old /etc/init.d scripts, but are a bit more structured and powerful. That said, Upstart is regrettably far from complete, although the functionality is much better and Upstart has some cool features, some things do not work that well. For one thing, documentation, where it exists, is useless, at best. Secondly, there is very limited ability to test and develop Upstart scripts. And this is made worse by the fact that the documentation is so bad. Another thing is that Upstart insist on stopping services, by default, by sending a brutal kill signal. Not good for databases, mostly.In the /etc/init directory are the Upstart scripts you have. In difference to the old init.d scripts, you cannot disable a service in Upstart curenntly. If it is in /etc/init it will be started at system start. That’s it. And this is something that I am sure will be fixed, but for now, again, is something we have to live with. Upstart scripts have the suffix .conf (don’t ask me why), so the default MySQL Upstart script, for example, is called /etc/init/mysql.conf.In an Upstart script, there are Stanzas that determine what to do. Like the exec Stanza that runs a program for example. And you may then ask, when is it run? Startup? Shutdown? And the answer is startup. For shutting things down, as I said before, Upstart will by default just send a kill -9 signal.The minimal startup script you can have, and this actually works in a reasonable way, is to just have one line with an exec stanza, like this:exec /usr/bin/mydaemonWhich will start the daemon. For stopping the daemon, Upstart will send a -9 signal to the started process by default, and nothing more is needed in the Upstart script.For MySQL, we need to make things a bit more complicated. The default mysql.conf Upstart script really is not good. For one thing, it will not do a controlled shutdown of MySQL (this is possible even if Upstart will eventually send a kill -9 anyway). Secondly, this script assumes that what we use is a standard Ubunty installed MySQL distribution, so if you have installed MySQL in /usr/bin/mysql5147 or somethings like that, you are out of luck.So what I wanted to create was an Upstart script for MySQL that fullfilled these requirements:Starts MySQL automatically.Waits for MySQL to be available before exiting.Be configurable to support different MySQL install locations, data directories etc.Do a clean shutdown of MySQL when stopping the MySQL services.Before I show you what I ended up with, I want to comment on the points 2 and 4 above. With Upstart, you can define a script or command to run just before or after a services has been started or stopped, and this is what I use to wait for MySQL to become available, and to send a SIGTERM to the MySQL Server when stopping (which will do a clean MySQL shutdown).So here we go, a complete MySQL Upstart script, the way I want it to work:## MySQL Service for Recorded Future#description “MySQL Server”author “Anders Karlsson, Recorded Future”start on (net-device-up and local-filesystems and runlevel [2345])stop on runlevel [016]expect forkkill timeout 2# Set variables.env MYSQL_ETC=/etc/mysqlenv MYSQL_PIDFILE=/var/run/mysql.pidenv MYSQL_HOME=/usr/local/mysql5.5env MYSQL_INSTANCE=myumask 007exec $MYSQL_HOME/bin/mysqld_safe –defaults-file=$MYSQL_ETC/$MYSQL_INSTANCE.cnf >> /tmp/x.out &post-start script loop=600# Wait for MySQL to start. while [ $loop -gt 0 ]; do if $MYSQL_HOME/bin/mysqladmin –defaults-file=$MYSQL_ETC/$MYSQL_INSTANCE.cnf ping; then break fi loop=$(($loop – 1)) sleep 1 done exit 0end script# Send a soft SIGTERM to MySQL before Upstart will kill it.# A Sigterm to mysqld will cause a controlled shutdown.pre-stop script exec kill -SIGTERM `cat $MYSQL_PIDFILE`# Wait for MySQL to end. Flushing buffers and all. loop=600 while [ $loop -gt 0 ]; do# If the pidfile is found, then continue waiting. if [ -e $MYSQL_PIDFILE ] ; then loop=$((loop – 1)) sleep 1 continue fi break doneend scriptTo be honest, this is not what I create for all our MySQL servers. Instead I used this to create a chef template, chef is what we use for configuration management here (see http://www.opscode.com/ for more on chef), and here it is put to good ude to generate an Upstart script for MySQL. The above is just an example./Karlsson

Installing Lighttpd With PHP5 And MySQL Support On Ubuntu 10.10

Nov 30, 2010

Installing Lighttpd With PHP5 And MySQL Support On Ubuntu 10.10

Lighttpd is a secure, fast, standards-compliant web server designed
for speed-critical environments. This tutorial shows how you can install
Lighttpd on an Ubuntu 10.10 server with PHP5 support (through FastCGI)
and MySQL support.

Source list Ubuntu

Jun 20, 2010

Ubuntu 10.04 deb http://bos.fkip.uns.ac.id/ubuntu/ lucid main restricted universe multiverse deb http://bos.fkip.uns.ac.id/ubuntu/ lucid-updates main restricted universe multiverse deb http://bos.fkip.uns.ac.id/ubuntu/ lucid-security main restricted universe multiverse Ubuntu 9.04 deb http://bos.fkip.uns.ac.id/ubuntu/ jaunty main restricted universe multiverse deb http://bos.fkip.uns.ac.id/ubuntu/ jaunty-updates main restricted universe multiverse deb http://bos.fkip.uns.ac.id/ubuntu/ jaunty-security main restricted universe multiverse Ubuntu 8.10 deb http://bos.fkip.uns.ac.id/ubuntu/ intrepid main restricted universe multiverse [...]

reporting from Ubuntu 10.04

May 04, 2010

pThis entry is the first from the new distribution of Ubuntu 10.04.nbsp; I decided to update it now, rather than wait and work out any bugs.nbsp; This decision came after reading an article in the Linuxnbsp; format magazine about how you can help improve your favourite distribution, even if your not an expert in computer programming, simply by reporting any bugs.nbsp; So instead of waiting for others to do the work and thennbsp; install the finished product, I thought I’d help out in thatRead More…

Repository ubuntu 10.04 lucid lynx

Apr 29, 2010

Repository Ubuntu 10.04
tambahkan di
#nano /etc/apt/source.list
deb http://dl2.foss-id.web.id/ubuntu/ lucid-backports main restricted universe multiverse
deb http://dl2.foss-id.web.id/ubuntu/ lucid-proposed main restricted universe multiverse
deb http://dl2.foss-id.web.id/ubuntu/ lucid-security main restricted universe multiverse
deb http://dl2.foss-id.web.id/ubuntu/ lucid-updates main restricted universe multiverse
deb http://dl2.foss-id.web.id/ubuntu/ lucid main restricted universe multiverse
Repository Speedy
deb http://opensource.telkomspeedy.com:5432/ubuntu lucid main restricted universe multiverse
deb http://opensource.telkomspeedy.com:5432/ubuntu lucid-updates main restricted universe multiverse
deb http://opensource.telkomspeedy.com:5432/ubuntu lucid-security main restricted universe multiverse
source? speedy [...]

Merecovery GRUB2 (Ubuntu 9.10)

Mar 31, 2010

Ubuntu Koala Karmic/Ubuntu 9.10 berbeda dengan Ubuntu-ubuntu sebelumnya, dulu kita dapat bebas mengedit file GRUB yang terdapat di /boot/grub/menu.lst. sedangkan GRUB 2 ini pengaturannya terdapat pada pada file /etc/default/grub dan file-file didalam folder /etc/grub.d/. Bagaimana seandainya grub2 kita terjadi error??
Berikut langkah-langkah mengembalikan/recovery grub 2;
1. Booting menggunakan live cd ubuntu; masuk ke terminal, jalankan [...]

Task Manager di Ubuntu

Mar 31, 2010

Beda di windows, kalau error atau hank cara jitu mengatasinya dengan mengetikkan ctrl + alt + del muncullah Windows Task Manager. Bagi pengguna windows pasti tau apa yang harus mereka lakukan?? Bagaimana dengan di Ubuntu?? Memang jarang sih hal ini di singgung, karena banyak pengalaman, Linux memang terbukti jarang terjadi crash atau hang atau ?not [...]

Wajah Baru Ubuntu

Mar 11, 2010

Ubuntu berganti wajah ? ya mulai release berikutnya yaitu Ubuntu 10.04 code name Lucid Linx, ada sedikit perubahan pada ubuntu, khusus nya bagian artwork nya, mulai dari Logo Ubuntu, Logo Komunitas, Tema, Boot Splash, Sampai Template website Ubuntu.com pun ikut berubah

Berikut ini tampilan beberapa screenshoot yang di dapat dari berbagai sumber prikitiwww…

Logo Baru Ubuntu

Logo-Logo Komunitas

read more

Kurnia Ramadhani: Turn On Swap di Ubuntu Server 9.10

Feb 14, 2010


tanya siapa?

Iseng-iseng nyobain nginstall ubuntu server 9.10 di vbox. Cuman kok agak merasa aneh dengan sistem yang terinstall, masak udah diset ram 128 MB kok agak berat. Ternyata, cek punya cek, swapnya tidak aktif. (doh)

Ketika melihat log ketika booting, ternyata memang swap tidak termount. /dev/mapper/cryptswap1 gagal dibuka. Nah, gimana buat nyalain swapnya? Pake aja perintah berikut:

sudo swapon /dev/mapper/cryptswap1

Atau kalau mau otomatis nyala tambahkan aja line tersebut di /etc/init.d/rc. Biar setiap booting swapnya langsung nyala. :-)