Anope IRC Services

Please login or register.

Login with username, password and session length
Advanced search  

News:

Pages: [1]   Go Down

Author Topic: Anope 2.0 mysql error during install  (Read 19990 times)

0 Members and 1 Guest are viewing this topic.

Francesco

  • Anope User
  • Offline Offline
  • Gender: Male
  • Posts: 15
  • Il Caius
    • Caius' Site
Anope 2.0 mysql error during install
« on: January 20, 2014, 03:21:55 PM »

Hi, I have a problem while configuring Anope.
I downloaded and unpacked properly the anope-2.0.0-rc1-source.tar.gz archive, then I moved into the anope-2.0.0-rc1-source directory and run the ./extras script, in which I activated the m_mysql.cpp module. After that I run ./Config and answered to all the questions, so it started building, but it stopped suddenly with the message:
Code: [Select]
CMake Error at cmake/Anope.cmake:411 (message):
  /home/ircuser/anope-2.0.0-rc1-source/modules/m_mysql.cpp needs header file
  mysql/mysql.h but we were unable to locate that header file! Check that the
  header file is within the search path of your OS.
What does it mean? How can I fix?
My server is a centos-6-x86_64 VPS and I installed gcc, gcc-c++, cmake, mysql, mysql-server and and all their dependencies. I forgot something?
I hope someone knows how to help me
Thanks

LEthaLity

  • Team
  • *
  • Offline Offline
  • Gender: Male
  • Posts: 307
    • LEthaLity
Re: Anope 2.0 mysql error during install
« Reply #1 on: January 20, 2014, 03:28:50 PM »

header files come in dev/devel packages, which it seems you don't have.
Though the name varies across some distro's you want to install libmysqlclient-dev, possibly mysql-devel (check for your os/distro)
Logged

Francesco

  • Anope User
  • Offline Offline
  • Gender: Male
  • Posts: 15
  • Il Caius
    • Caius' Site
Re: Anope 2.0 mysql error during install
« Reply #2 on: January 20, 2014, 04:17:25 PM »

I installed mysql-devel with yum install mysql-devel command and run again ./Config.
Now during building it stops with error:
Code: [Select]
CMake Error at cmake/Anope.cmake:464 (message):
  /home/ircuser/anope-2.0.0-rc1-source/modules/m_mysql.cpp needs library
  mysqlclient but we were unable to locate that library! Check that the
  library is within the search path of your OS.
What can I do?
Thanks for your quick reply

Eyecu

  • Anope User
  • Offline Offline
  • Posts: 29
Re: Anope 2.0 mysql error during install
« Reply #3 on: January 21, 2014, 03:10:23 PM »

yum install mysqlclient
Logged

Francesco

  • Anope User
  • Offline Offline
  • Gender: Male
  • Posts: 15
  • Il Caius
    • Caius' Site
Re: Anope 2.0 mysql error during install
« Reply #4 on: January 21, 2014, 04:11:25 PM »

I know that installing mysql (with yum install mysql) should be installed mysql client, and I did it at the beginning, so if I retry now it says:
Code: [Select]
Package mysql-5.1.71-1.el6.x86_64 already installed and latest version
Nothing to do
Instead, trying with yum install mysqlclient as you suggest, it gives an error:
Code: [Select]
No package mysqlclient available.
Error: Nothing to do

katsklaw

  • Supporter
  • Anope User
  • Offline Offline
  • Posts: 537
Re: Anope 2.0 mysql error during install
« Reply #5 on: January 21, 2014, 11:34:34 PM »

According to Google it's named mysql-client.
Logged

Francesco

  • Anope User
  • Offline Offline
  • Gender: Male
  • Posts: 15
  • Il Caius
    • Caius' Site
Re: Anope 2.0 mysql error during install
« Reply #6 on: January 22, 2014, 12:10:33 AM »

According to Google it's named mysql-client.

I tried also this, but with the same result:
Code: [Select]
No package mysql-client available.
Error: Nothing to do[code]

Eyecu

  • Anope User
  • Offline Offline
  • Posts: 29
Re: Anope 2.0 mysql error during install
« Reply #7 on: January 22, 2014, 12:15:37 AM »

Not sure on centos 6 as it's been along time since i used centos. But i do remember not all that long ago setting up anope 1.9 on a centos 5.9 box and had similar issues.  In the end i ended up having to symlink the libmysqlclient:
Code: [Select]
ln -s /usr/lib/mysql/libmysqlclient.so.18.0.0 /usr/lib/mysql/libmysqlclient.so

With you being on a different release the paths and actual version numbers may vary.
Logged

Adam

  • Team
  • *
  • Offline Offline
  • Posts: 463
Re: Anope 2.0 mysql error during install
« Reply #8 on: January 22, 2014, 12:16:28 AM »

I had to symlink /lib64/libmysqlclient.so -> /usr/lib64/mysql/libmysqlclient.so.16
Logged

Francesco

  • Anope User
  • Offline Offline
  • Gender: Male
  • Posts: 15
  • Il Caius
    • Caius' Site
Re: Anope 2.0 mysql error during install
« Reply #9 on: January 22, 2014, 12:12:27 PM »

I had to symlink /lib64/libmysqlclient.so -> /usr/lib64/mysql/libmysqlclient.so.16

Thanks a lot! I used this and finally it works, I've got Anope 2.0.0 running on my IRC Network.

One last question: now I've got anope.db as database: how I can move it into MySQL?

katsklaw

  • Supporter
  • Anope User
  • Offline Offline
  • Posts: 537
Re: Anope 2.0 mysql error during install
« Reply #10 on: January 22, 2014, 02:22:36 PM »

Start by reading the supplied documentation.
Logged

Francesco

  • Anope User
  • Offline Offline
  • Gender: Male
  • Posts: 15
  • Il Caius
    • Caius' Site
Re: Anope 2.0 mysql error during install
« Reply #11 on: January 22, 2014, 03:09:22 PM »

I solved it with the help of a friend. Thanks to all!

Cory Melth

  • Anope User
  • Offline Offline
  • Posts: 7
Re: Anope 2.0 mysql error during install
« Reply #12 on: January 23, 2014, 06:13:17 PM »

I solved it with the help of a friend. Thanks to all!

.. 15 minutes after .. I receive a private message from "Francesco", he ask me how to run MySQL as live state..

So,

- You don't have "solved" anything, because this is not an issue, you don't know how Anope work .. this is different.
- Basicly, you have to read somes file of documentation ..


So, now it's say's .. if you want a quick answer to your private message at same time;

[Very easy way to do]
- Create a DB and user DB
- In services.conf
â—˜ Config your services.conf to run as "db_sql_live" and NOT on "db_sql"
â—˜ scroll down and put engin "mysql/main"
â—˜ choose prefix for you db table ..
â—˜ let import at false
â—˜ uncomment and check if the "modules.conf" is correctly configured to work in services.conf.
- In modules.conf
â—˜ set up IP of remote MySQL connection
â—˜ setup login .. password user password too .. let the port as the same
â—˜ get and put the nameservers and dns
â—˜ dont forget to uncomment the "m_mysql" module..
â—˜ scroll down and uncomemnt the "m_sql_authentification" module, not necessary to do change here .. but if you want to run the "authentification" module from another Mysql base of services, you can by modify the script in the "m_sql_authentification" module.

I think that's all .. and if you follow that, services will run properly.
I hope this helpfull other person !

Best regards;
C. Melth

Logged

Francesco

  • Anope User
  • Offline Offline
  • Gender: Male
  • Posts: 15
  • Il Caius
    • Caius' Site
Re: Anope 2.0 mysql error during install
« Reply #13 on: January 23, 2014, 10:09:39 PM »

.. 15 minutes after .. I receive a private message from "Francesco", he ask me how to run MySQL as live state..
It's a day after, not only 15 minutes :D

However, in
One last question: now I've got anope.db as database: how I can move it into MySQL?
I asked how to import database files into mysql database, and it this that I solved with a friend, in fact now I've anope with db_sql_live support perfectly running

In the private message I sent to you instead, referring to the post you wrote in https://forum.anope.org/index.php?topic=4076.msg21682#msg21682 I simply ask you how to store password in mysql not in base64 format, so I was expecting only the answer to this question.

Cory Melth

  • Anope User
  • Offline Offline
  • Posts: 7
Re: Anope 2.0 mysql error during install
« Reply #14 on: January 24, 2014, 01:18:17 AM »

I'Ts a very bad ideas to keep password as clear text, but if you want to know follow this;

- In services.conf
â—˜ config the encryption to "enc_none" (Uncomment, and comment the other encryption .. )
- In modules.conf
â—˜ In the "m_sql_auth.." you have a line as can cancel the "register" features from the service, this is what you have to do if you want as a clear text. (Yes you'll said, how user will register in my network ? Basicly with this method you have to but the addresse of your Register web page, on a site web..)
â—˜ After you have do that, int he same block, modify the line of query MySQL ton complet !

That's all !


Best regards, and hope that's help you !

Ps: Yes, the private message is after one day + 15 min, I don't have see corectly, I assume that, very sorry ;)
Logged

Cardare

  • Anope User
  • Offline Offline
  • Posts: 4
Re: Anope 2.0 mysql error during install
« Reply #15 on: January 24, 2014, 07:17:11 PM »

For the sake of your users, don't store the passwords in plain text. Also don't use MD5 because it is susceptible to rainbow/collision attacks if your web registration system is vulnerable and your DB gets out. Don't 'assume' it will never happen, always assume it will and make time to prepare for it. LinkedIn failed to do this, and look what happened to their users passwords:

http://gizmodo.com/your-hacked-linkedin-password-is-art-1482543301

Your users and potential users will trust your service and you more if you employ hashing+salting (its not really encryption because encryption assumes it can be decrypted whereas hashing can't be reversed) because if your DB got out and everything was in plain text you'd lose the trust (and likely the custom) of all your users very quickly.
« Last Edit: January 24, 2014, 07:19:04 PM by Cardare »
Logged

katsklaw

  • Supporter
  • Anope User
  • Offline Offline
  • Posts: 537
Re: Anope 2.0 mysql error during install
« Reply #16 on: January 25, 2014, 01:21:46 PM »

For the sake of your users, don't store the passwords in plain text. Also don't use MD5 because it is susceptible to rainbow/collision attacks if your web registration system is vulnerable and your DB gets out. Don't 'assume' it will never happen, always assume it will and make time to prepare for it. LinkedIn failed to do this, and look what happened to their users passwords:

http://gizmodo.com/your-hacked-linkedin-password-is-art-1482543301

Your users and potential users will trust your service and you more if you employ hashing+salting (its not really encryption because encryption assumes it can be decrypted whereas hashing can't be reversed) because if your DB got out and everything was in plain text you'd lose the trust (and likely the custom) of all your users very quickly.

Exactly why having a web interface to services is a bad idea in the first place. It's far too much maintenance for far too little gain. Yes, there are some that think it's handy or cool but it's a huge potential security hole waiting to be discovered. It's far more secure to use a flat db with hashed passwords.

In the resent past I've found that less is truly more to most loyal chatters. In my research users that pick a network and stay for 10+ years could care less about all the fancy stuff and only want to chat. They are connected to talk to their friends, not to learn a 120 step command structure. My research also seems to indicated that in most cases the people mostly likely to impressed with web interfaces or any other type technology are mainly the network administration, with a few exceptions of course as some users.

My 2 cents.
Logged

Cardare

  • Anope User
  • Offline Offline
  • Posts: 4
Re: Anope 2.0 mysql error during install
« Reply #17 on: January 25, 2014, 02:15:03 PM »

Exactly why having a web interface to services is a bad idea in the first place. It's far too much maintenance for far too little gain. Yes, there are some that think it's handy or cool but it's a huge potential security hole waiting to be discovered. It's far more secure to use a flat db with hashed passwords.

In the resent past I've found that less is truly more to most loyal chatters. In my research users that pick a network and stay for 10+ years could care less about all the fancy stuff and only want to chat. They are connected to talk to their friends, not to learn a 120 step command structure. My research also seems to indicated that in most cases the people mostly likely to impressed with web interfaces or any other type technology are mainly the network administration, with a few exceptions of course as some users.

My 2 cents.

I completely agree and I only recommend going down that route if you are particularly confident in your skills to secure your DB. The only reason I'm doing it is down to building a Single-Sign-On system where there are other web services present and I don't want people to have to keep registering for everything separately if they want to give other things a try. It'd be easier for them if they can log in to the account system and tick a box to allow that system to grant the login (priority on better user experience) and I don't want to have to keep building accounts systems for everything I want to try (easier on future development). The IRC network isn't so much the key aspect of what I'm trying to achieve in doing this, rather a compliment to it - it's not the central project everything spins around in my case (like how deviantArt has an IRC network, but that isn't what they're known for). I don't restrict anyone not registered and they don't have to register, but if channel management is their thing then they'll need to, obviously.

If all you are doing is IRC and nothing else (you aren't going down the attempt to implement SSO that I am) then there isn't really much point to going down the route of setting up web registration (unless there is something really specific you are trying to achieve).

I don't want to be discouraging of course, but make sure you are absolutely sure of what you want to achieve in doing so. If all you are doing is running an IRC network with no intention on doing anything else then maybe this isn't the route you want to take as it adds barriers for your users (unless they have no clue how IRC works, but chances are if a user knows about IRC, they know how some of it works and know what things to expect). If your DB does get stolen, be prepared to tell your users the bad news. Better for them to find out from your mouth as quick as possible than to keep it hush-hush and hope they don't find out from somewhere else. If all you want is an online IRC client then you don't need webaccess to your nickdb for that. That's why it's taken me almost 10 years of managing my IRC network to justify going down this route.

Being a sysadmin may sound fun, but you automatically inherit responsibilities which you might not like the idea of. Can you say with a straight face to your users that their data is safe?
Logged
Pages: [1]   Go Up