If you’re using MySQL and you prefer yum and rpm, Oracle announced availability of Yum repositories for MySQL database and related products. Initial release is focused on EL6-based distros as well as Fedora 18 and 19 for:
- MySQL Database 5.6
- MySQL Workbench 6.0
- MySQL Connector/ODBC 5.2
For more info, check http://insidemysql.com/announcing-new-yum-repositories-for-mysql/
Posted in MySQL, Other.
– November 19, 2013
The best way to help open source is to donate money… If you’re FreeBSD fun or you just want to help, please donate - http://www.freebsdfoundation.org/donate
Posted in Other.
– November 17, 2013
Image made by Karanbir Singh (https://twitter.com/kbsingh)
Posted in CentOS, Linux.
– November 11, 2013
I suppose you have a couple of clients who believes in Teamviewer only. Teamviewer on Linux works fine but after you install it, you’ll be supprised that the proces is always running in the background (it is build to respawn) which is ok if you’re the client who needs help. The first thing which average sys admin will do is to shut down teamviewer.
To stop teamviewer you can use:
initctl stop teamviewerd
To disable teamviewer on system startup you can use:
teamviewer --daemon disable
More info about the deamon you can find with:
boss init.d # teamviewer --help
teamviewer start TeamViewer user interface (if not running)
teamviewer --help print this help screen
teamviewer --version print version information
teamviewer --info print version, status, id
teamviewer --passwd [PASSWD] set a password (useful when installing remote (ssh)
teamviewer --ziplog create a zip containing all teamviewer logs (useful when contacting support)
teamviewer --daemon status show current status of the TeamViewer daemon
teamviewer --daemon start start TeamViewer daemon
teamviewer --daemon stop stop TeamViewer daemon
teamviewer --daemon restart stop/start TeamViewer daemon
teamviewer --daemon disable disable TeamViewer daemon - don't start daemon on system startup
teamviewer --daemon enable enable TeamViewer daemon - start daemon on system startup (default)
Posted in Other, Tips & Tricks.
– October 21, 2013
I would like to annouce a 2013. winner in “Bugs per line of code 2013.” contest.
Pleeeease welcome – MySQL Workbench
Posted in Other.
– July 26, 2013
If you’re using PHP 5.2.x on RHEL/CentoOS and you received error
PHP Fatal error: Call to undefined function sqlite_escape_string()
don’t worry. The reason for this is the missing sqlite extension which is not included in RHEL/Fedora/CentOS php packages by default.
To fix this issue, you can include it manually
tar xzvf php-5.2.XX.tar.gz
echo extension=sqlite.so >> /etc/php.d/sqlite.ini
service httpd restart
Replace XX with your PHP version (check the php version with “php -v”)
Posted in CentOS, PHP, Tips & Tricks.
– July 19, 2013
pgModeler is an open source tool for modeling PostgreSQL databases which is very similar to MySQL Workbench. The models created by the user can be exported to SQL code and applied directly into database clusters (Version 9.x). As a Workbench user, it took me only couple of minutes to design my first PostgreSQL database model.
The link: http://www.pgmodeler.com.br/
Posted in PostgreSQL.
– June 22, 2013
Since the Oracle bought Sun (including MySQL), I wanted to improve my knowledge about other databases and to check the alternatives (in case “something” happens to MySQL).
Luckily, MySQL is still here and it still works fine but in the last couple of months, I wanted to dig a little bit about PostgreSQL. I thought that it would be easy to find online tutorials about this topic but I noticed that online tutorials and forums about PostgreSQL are not so popular. Don’t get me wrong, there are several blogs which fits perfectly in my learning habits but spending so much time just to find the basic things is not what I wanted.
I found a link about Packt Publishing free PostgreSQL backup e-book and I didn’t wait (LINK). I posted a comment and couple days later received Packt account with two books
Instant PostgreSQL Starter by Daniel K. Lyons was exactly what I was looking for. A small (48 pages) book was right away uploaded to my DropBox so I can have it where ever I go. The book covers everything you need to start with Postgresql.
You will learn how to install Postgresql, how to connect and create your first database. The book also covers basic SQL queries for creating tables, CRUD (create, read, update and delete records), etc. The last part of the book contains some features you should also know (how to store passwords, working with XML, Full text search and basic options for improving speed and security). Couple advices about backups are also there.
Using pgAdmin III as a GUI tool won’t be a problem because the book contains pgAdmin screenshots.
Don’t get me wrong…. The book has only 48 pages and it can be compared with a cheat sheet but it is a very good portable book. Learning Postgresql can take only one afternoon and in less than a weekend you’ll became a “usable” DBA.
After the Postgresql starter book, I switched to PostgreSQL Backup and Restore How-to. We usually like to say that backup doesn’t have the price and every DBA should know everything about creating and restoring backups.
This (55 page) book is a step-by-step guide to backing up and restoring your database which covers:
- basic and partial exports,
- simple restore,
- creating and restoring binary backups,
- compressing backups
- taking snapshots
- sync backups
- point in time recovery
- warm and hot standby restore
- streaming replication
Just like the first book, this one is also uploaded to my DropBox. Having those books with you is a nice idea and I highly recommend them to all Postgresql beginners. You can buy them as an e-book and as a hard copy.
Posted in PostgreSQL, Tips & Tricks.
– May 21, 2013
Nginx is a free, open-source, high-performance HTTP server and reverse proxy, as well as an IMAP/POP3 proxy server. Nginx now hosts nearly 12.18% (22.2M) of active sites across all domains. Nginx is known for its high performance and low resource consumption.
To add nginx yum repository, create a file named /etc/yum.repos.d/nginx.repo and paste one of the configurations below:
Due to differences between how CentOS, RHEL, and Scientific Linux populate the $releasever variable, it is necessary to manually replace $releasever with either “5″ (for 5.x) or “6″ (for 6.x), depending upon your OS version.
Now, be sure that apache is not started
#service httpd stop
#chkconfig --level 235 httpd off
and install nginx with
Posted in CentOS, nginx, Server project.
– May 13, 2013
So… After the first part (Link) where we talk about the installation,
the next step would be to create root user and to change postgres and root password.
[root@XTdata init.d]# su postgres
bash-3.2$ createuser -s root
bash-3.2$ createdb root --owner=root
[root@XTdata data]# psql
Type "help" for help.
root=# ALTER USER postgres WITH PASSWORD 'SomePAASWDe348';
root=# ALTER USER root WITH PASSWORD 'SomePAASWDe3489898';
Now, the next step would be to allow remote connections.
postgresql.conf is the main PostgreSQL config file. To be able to reach the server remotely, find the commented line
#listen_addresses = 'localhost' # what IP address(es) to listen on;
uncomment the line and replace the localhost with the servers IP address. (or replace it with * which means – listen on all interfaces)
listen_addresses = '*' # what IP address(es) to listen on;
PostgreSQL, by default, refuses all connections it receives from any remote host. The remote hosts can be controled via pg_hba.conf file (located in the same dir like postgresql.conf).
Add the next line
host all all 192.168.10.57/32 md5
where 192.168.10.57 is the remote host IP address.
Also, you can allow any host by replacing the 192.168.10.57/32 with 0.0.0.0/0.
The line syntax is
local DATABASE USER METHOD [OPTIONS]
host DATABASE USER ADDRESS METHOD [OPTIONS]
hostssl DATABASE USER ADDRESS METHOD [OPTIONS]
hostnossl DATABASE USER ADDRESS METHOD [OPTIONS]
which is documented inside the pg_hba.conf. Save the file and restart the server.
I prefer the pgAdmin III tool which can be used for remote management. Fire it up, select File, Add Server… Enter name, host, Username and password.
This should be enough for now…
Posted in CentOS, PostgreSQL, Server project, Tips & Tricks.
– May 8, 2013