Sistem üzerinde curl yüklendikten sonra aşağıdaki kod bloğu ile composer rahatlıkla kurulabilmektedir.
sudo apt install curl
curl -sS https://getcomposer.org/installer | sudo php -- --install-dir=/usr/local/bin --filename=composer
composer
Yarınlar yorgun ve bezgin kimselere değil, rahatını terk edebilen gayretli insanlara aittir.
22 Haziran 2018 Cuma
Ubuntu 18.04 postgresql 10 konfigürasyon + uzak erişim yetkisi + pg_dump+ import işlemleri
Ubuntu 18.04 üzerinde Postgresql 10 veritabanında postgres kullanıcı şifresi değiştirme, erişim yetkisi verme, uzak sunucudan yedek alma, alınan bu yedeğin lokal postgresql veritabanına import edilme işlemleri için aşağıdaki kodlar yeterli olacaktır.
sudo -u postgres psql
\password -> yeni şifre ver.
locate pg_hba.conf
sudo nano /etc/postgresql/10/main/pg_hba.conf
içine ekle -> host all all 0.0.0.0/0 md5
locate postgresql.conf
sudo nano /etc/postgresql/10/main/postgresql.conf
#listen_addresses='localhost' -> değiştir -> listen_addresses='*'.
sudo service postgresql restart.
pg_dump -C -h Remote_Host -U postgres postgres | gzip > postgres.gz
zcat postgres.gz | psql -U postgres -h 127.0.0.1 -W
sudo -u postgres psql
\password -> yeni şifre ver.
locate pg_hba.conf
sudo nano /etc/postgresql/10/main/pg_hba.conf
içine ekle -> host all all 0.0.0.0/0 md5
locate postgresql.conf
sudo nano /etc/postgresql/10/main/postgresql.conf
#listen_addresses='localhost' -> değiştir -> listen_addresses='*'.
sudo service postgresql restart.
pg_dump -C -h Remote_Host -U postgres postgres | gzip > postgres.gz
zcat postgres.gz | psql -U postgres -h 127.0.0.1 -W
Ubuntu 18.04 mysql konfigürasyonu + mysqldump + import işlemleri
Ubuntu 18.04 üzerinde mysql için yeni bir kullanıcı oluşturmak, bu kullanıcıya bütün yetkileri vermek, uzak sunucudan lokal'e yedek almak ve alınan yedeği yeni oluşturulan kullanıcı ile lokal mysql sunucunuza import etmek için aşağıdaki kod yeterli olacaktır.
sudo su mysql
CREATE USER 'user'@'%' IDENTIFIED BY 'pass';
GRANT ALL PRIVILEGES ON *.* TO 'user'@'%';
FLUSH PRIVILEGES;
CREATE DATABASE new_db;
mysqldump -h [Remote_Host] -u [Remote_User] -p [Remote_Database] | gzip -c > backup.sql.gz
zcat backup.sql.gz | mysql -h 127.0.0.1 -u user -p new_db
sudo su mysql
CREATE USER 'user'@'%' IDENTIFIED BY 'pass';
GRANT ALL PRIVILEGES ON *.* TO 'user'@'%';
FLUSH PRIVILEGES;
CREATE DATABASE new_db;
mysqldump -h [Remote_Host] -u [Remote_User] -p [Remote_Database] | gzip -c > backup.sql.gz
zcat backup.sql.gz | mysql -h 127.0.0.1 -u user -p new_db
9 Mayıs 2018 Çarşamba
Ubuntu ipv6 disable işlemi
Ubuntu client ya da sunucu üzerinde ipv6 deaktif etme işlemi için aşağıdaki işlemleri sırasıyla yapmak yeterli olacaktır.
sudo nano /etc/sysctl.conf
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
sudo sysctl -p
Son olarak aşağıdaki komut sonucunda ekranda 1 çıktı ise işlem başarılı demektir.
cat /proc/sys/net/ipv6/conf/all/disable_ipv6
sudo nano /etc/sysctl.conf
net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
net.ipv6.conf.lo.disable_ipv6 = 1
sudo sysctl -p
Son olarak aşağıdaki komut sonucunda ekranda 1 çıktı ise işlem başarılı demektir.
cat /proc/sys/net/ipv6/conf/all/disable_ipv6
26 Ekim 2017 Perşembe
Linux üzerinde postgresql 9.5 -> 9.6 güncellemesi
Adım 1
Postgresql uzak reposunu list dosyamıza ekliyoruz.
sudo echo 'deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main' > /etc/apt/sources.list.d/pgdg.list
Eğer /etc/apt/sources.list.d/ dizini altında pgdg.list yok ise touch komutu ile oluşturup içine deb http://apt.postgresql.org/pub/repos/apt/ xenial-pgdg main ekleyip de işlemimize devam edebiliriz.
Adım 2
wget --quiet -O - https://www.postgresql.org/media/keys/ACCC4CF8.asc | sudo apt-key add -
ile keyi alıyoruz.
Adım 3
sudo apt update ile güncelleme yapıp
sudo aptitude install postgresql-9.6 postgresql-client-9.6 postgresql-contrib-9.6
komutu ile postgresql 9.6 versiyonunu kuruyoruz.
Adım 4
pg_lsclusters komutu ile sunucuya gelen clusterları listeliyoruz. Burda 9.6 main cluster gelmiş olmalı. Eğer gelmemiş ise kurulumda bir hata almış ya da eksik bir işlem yapmış olabilirsiniz.
Adım 5
Sırasıyla aşağıdaki komutları uygulayarak güncelleme işlemini tamamlayabilirsiniz.
sudo pg_dropcluster 9.6 main --stop
sudo pg_upgradecluster 9.5 main
sudo pg_dropcluster 9.5 main
Bu işlem sırasında 9.5 cluster upgrade edilemez ise postgresql 9.6 yı tekrar kurup deneyebilirsiniz.
25 Ekim 2017 Çarşamba
Pardus 17 wine32 sorunu ve çözümü
Pardus 17 üzerinde wine paketini kurduğunuzda otomatik olarak wine64 kurulmakta. Bazı programları çalıştırırken wine32 istemekte. Bunun için aşağıdaki komutlar sorunu çözecektir.
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install wine wine32:i386
sudo dpkg --add-architecture i386
sudo apt-get update
sudo apt-get install wine wine32:i386
19 Ekim 2017 Perşembe
How to flush / clean DNS in ubuntu?
DNS servers convert a domain name (such as
example.com) into an IP address (in this case 123.123.123.123). The
mapping of names to numbers can change from time to time. Your
computer holds a record of DNS entries to save looking them up every
time. This is your DNS cache. You can delete those records (flush the
cache) any time you like. If a website has recently moved servers,
you might see the old website for a while. Flushing your DNS cache
might help.
Run
these commands to flush your dns cache:
- sudo /etc/init.d/dns-clean restart
- sudo /etc/init.d/networking force-reload
- sudo /etc/init.d/nscd restart
- sudo service network-manager restart
Kaydol:
Kayıtlar (Atom)